Administration user permissions
Posted: Sat May 19, 2007 7:59 pm
Hey everyone.
I'm building an administration panel for a website which has a lot of functionality and is going to be managed by quite a few people.
I ran into a bit of a problem as the best way to make user permissions (which are editable) work.
Not everyone will have access to the entire admin panel and I'll need a way to define who has access to what.
First off, this has to be stored inside of the user's table, on a field. This is sort of a requirement. Also, I don't want to use serialized arrays.
The administration panel is divided by general categories, which in turn have pages, which have categories as well. Something like:
Article -> Add Article -> Article Category = Means a user can only add an article to that category.
Forums -> Moderator -> Forum Category = Means a user is a moderator for this forum category.
I've thought about a variety of things, having values comma separated, dashes in between (I'd be using explode of course), etc but I can't really figure out a good and / or proper way to do this.
Later on, super admins can edit each individual user's permissions via a bunch of presets / tons of checkboxes (this isn't really a problem to do) so I'd have to have the option to edit / update any part of the 'string'.
If you have any questions / suggestions I'd be glad to hear them.
Thanks for your help.
André Ferreira.
I'm building an administration panel for a website which has a lot of functionality and is going to be managed by quite a few people.
I ran into a bit of a problem as the best way to make user permissions (which are editable) work.
Not everyone will have access to the entire admin panel and I'll need a way to define who has access to what.
First off, this has to be stored inside of the user's table, on a field. This is sort of a requirement. Also, I don't want to use serialized arrays.
The administration panel is divided by general categories, which in turn have pages, which have categories as well. Something like:
Article -> Add Article -> Article Category = Means a user can only add an article to that category.
Forums -> Moderator -> Forum Category = Means a user is a moderator for this forum category.
I've thought about a variety of things, having values comma separated, dashes in between (I'd be using explode of course), etc but I can't really figure out a good and / or proper way to do this.
Later on, super admins can edit each individual user's permissions via a bunch of presets / tons of checkboxes (this isn't really a problem to do) so I'd have to have the option to edit / update any part of the 'string'.
If you have any questions / suggestions I'd be glad to hear them.
Thanks for your help.
André Ferreira.