[eluser]FlashUK[/eluser]
I just had an idea about some code that could be used for a Auth library.
Controlling access to a controller/section by using the uri_string
This data could be stored into the database (group_id & request_uri). There is then no need to hardcode a group id into the page, just simply match it against the database.
Table layout I thought of for MySQL:
Code:
group_id | request_uri
It would also allow you to add access to other controls easily as you create them, or give a group more privileges via a admin panel.
If you wanted, you could use "/" as the request_uri for the group_id if you want to allow access to ALL controllers throughout the site (obviously for someone like "Super Admins" only).
What do you guys think? Any flaws?