The site uses different modules, which could be a forum, or an article database.
Now here comes the problem.. The user has the right to view the forum, and view the article database, but the rights a user has on a module can differ per module. The forum as the rights [admin, mod, user, anonymous], the article database has the rights [editor, poster, anonymous].
Now, the right of these 2 modules differ only one.. but what if a module has 9 different rights?
I've set up the first concept of the database..
Code: Select all
USERS (userid, username, password)
USERS_MODULES (userid, moduleid, userlevel)
MODULES (modileid, modulename, active)Two things i came up with where making the userlevel a string with the rights in words, written with seperators..
Code: Select all
post|mod|viewCode: Select all
0, 1, 2, 4, 8, 16, 32..
21 = accesright 1 + 4 + 16Now my question
ANYONE ANY IDEAS, PLEASE!