On Aug 27, 2009, at 2:55 AM, "John" <i...@dynatechdesign.ca> wrote:

Hi,



What is the best way to assign permissions to users?



a) Each user has a list of permissions associated with that user or

Nope



b)      Each task/permission has a list of users that qualify or

Nope



c)       Have a table with a row for each user/permission combination



Sort of. Create two tables a login table with user details and a specific field for a ROLE.

Then create a roles table that lists the various permissions. I store this in binary form in one field ( 10001111100100 ) where one means permission granted and 0 means not granted. I assign the permissions thru a form with checkboxes. You could also have permissons assigned to individual fields in the table ( ie fields for update, select, add, delete etc) to make things easier.

This process is significantly simpler when managing users, it's easier to adjust permissions on one role than to edit a bunch of users when something changes.








Thanks!



John



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Bastien

Sent from my iPod

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to