Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

66 users online



permission logic

permission logic

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
riah

riah

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

___________________

http://codetch.com/skin/sig.png

nertman

nertman

lurker
Status: Offline!

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

mcdude

mcdude

Blah
Status: Offline!

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.

Kickboy

Kickboy

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

Daystar

Daystar

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 ::

BigToach

BigToach

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!

mcdude

mcdude

Blah
Status: Offline!

Still, there for all to see though.

Phil

Phil

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

theTrinity

theTrinity

David
Status: Offline!

Can anyone point me to a good tutorial for the biggest n00b on this? (binary, bits, ect.)

Kickboy

Kickboy

Neverside Newbie
Status: Offline!

Didn't realize a tutorial was posted on it. My bad. Tongue

___________________

I don't suffer from insanity; I enjoy every minute of it.
Unintended Theory | Cacrew v4

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0084 seconds.