SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Role Bases Access Control Issues

    Hi all,

    I am working my way through the PHP & MySQL Novice to Ninja book by Kevin Yank.

    I am experiencing some strange behaviour with the role based user access control. The following is happening.

    I have 3 roles which are Admin, Coach and Player.

    If I have just an admin in the playerrole table (and other relevant tables), everything works fine.

    I go to click on the coach and player links to log in and get the appropriate 'Access Denied' pages.

    Then I go to add a player. I can see that they are assigned the correct role of Player in the database.

    However now when the admin goes back to the page that displays the logins, if they click on the 'Player Login', they are allowed in and no 'Access Denied' message is displayed.

    The admin can still not access the coach area. However as soon as I add a coach they then have access.

    Please note that everyone then has access to absolutely everything. So a player who should be only able to view their own details now has the same access rights at the admin.

    Does anyone have any ideas why this might be happening?

    Thanks for your time and help.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,401
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    You are probably missing some WHERE clause in your query. Just a wild guess though, without seeing some code it's impossible to tell.

  3. #3
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick reply. I will have a look in a short while and see if I can see anything.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •