
July 9th, 2005
10:50 PM
now with more lambda
Status: Offline!
permission logic
I am about to build my own permission handling system for a php/mysql cms and I am curious on what the most efficient, effective, and extensible ways of doing this is. I have my own ideas and have found a few examples, but I was wondering what you all might have used or found to work well.
More specifically, what type of permission/usergroup table setup is best?
thanks for any and all help
___________________


July 10th, 2005
07:42 AM
i'm working on one also for a little cms i'm working on
my table
// 5 | Administrator
// 4 | Moderator
// 3 | VIP
// 2 | Donor
// 1 | Normal
// 0 | Guest
then i just use a basic switch to display the content for each member type the switch is probably insecure and so is my method in general, but i'm rather still new to php and will secure everything more once i get it all working :]
if user number is = or greater then access number then give access if not give an error letting the user know he doesn't have permission to access the page then it emails me the user's info and the page they tried to access :]
any tips on what you have or would like to give me on what i have would be appreciated

July 10th, 2005
10:45 AM
Thats the way my applications use as well, I have found it to tbe the most effective way.
I also have a function because I use it allover my apps, this makes code shorter as I use it multiple times.

July 10th, 2005
11:30 AM
Neverside Newbie
Status: Offline!
I would tell you a good way. It's how I've been doing it, and recently found out Jeremie uses a very similar method for NeverAPI. However, there wouldn't be any fun in ruining some good secrets.
So, here's a hint:
http://www.php.net/manual/en/language.operators.bitwise.php
___________________
I don't suffer from insanity; I enjoy every minute of it.
Unintended Theory | Cacrew v4

July 10th, 2005
12:05 PM
One and The Same
Status: Offline!
Not really a secret when its already been written in tutorial form by Phil on this site:
http://forums.neverside.com/view/post532067/#post532067
___________________
:: We can be in the world, What we want to be ::

July 10th, 2005
12:22 PM
Neversidian
Status: Offline!
that was actually written by Jeremie, but them copied there by Phil
___________________
Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

July 10th, 2005
12:55 PM
Still, there for all to see though.

July 10th, 2005
04:42 PM
with Mr. Jones
Status: Offline!
I use auto-sorting bitwise db-loaded multiple group + user extendable permission system.
___________________
http://www.philbrodeur.com - Expert PHP Development and Tutorials

July 10th, 2005
07:32 PM
Can anyone point me to a good tutorial for the biggest n00b on this? (binary, bits, ect.)

July 10th, 2005
08:39 PM
Neverside Newbie
Status: Offline!
Didn't realize a tutorial was posted on it. My bad. 
___________________
I don't suffer from insanity; I enjoy every minute of it.
Unintended Theory | Cacrew v4