Group Rights system

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Andromeda
Forum Newbie
Posts: 11
Joined: Thu Nov 08, 2007 5:40 am

Group Rights system

Post by Andromeda »

Hello, I’m trying to create a sort of cms system.

But I’m having some problem finding out how the rights system shale works. The system is based on groups and modules.


My whole system is created as a module system, and the required module is loaded from the URL
(I use mod_rewrite)
http://myhost/[CATEGORY]/[PAGE NAME]/[ARG1]/[ARG2]/[ARG3]/...

A navigator could look like this

Movies
-> News (http://myhost/Movies/News/List/)
-> Images (http://myhost/Movies/Gallery/List)
-> And so on
Music
-> News (http://myhost/Music/News/List/)
-> Images (http://myhost/Music/Gallery/List)
-> And so on

My group database, is split up in 3 database (Much like the way phpbb workes)

DB group (This is just the group name and such info stuff)
group_id
group_name

DB group_users (This is what groups the users belong to)
Group_id
User_id

DB group_pages (This contains what rights the groups has on the page)
Group_id
Page_id
Group_read (1 = TRUE / 0 = FALSE)
Group_edit (1/2)
Group_create (1/2)
Group_delete (1/2)

My pages database might also be a good ideer to show you
DB pages
Page_id (Just the pages id)
Cat_id (The id of the category)
Page_show (The name to be shown in the menu)
Page_url (The name to be shown in the url, MUST be unik for each cat_id)
Page_module (The names of the module, to be includet)
Page_arg (Arguments that module needs to show the right page)

(I have let some parts of the database out that has nothing to do with this problem, just to keep it simple)

My problem:
My main problem is, how should I make a “default” setup for the users that is not loged in, and as I can see it will this give me some problems when I come deeper into the module, with links and so on.

My system is still in the planning part, I gladly take advice that will totally rework my system, just as long as it works: D

Any other advise to creating a CMS system is also welcome..

Thanks if advance
Andromeda
Kasper Søgaard
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Have you looked into the various Access Control List libraries available?
Andromeda
Forum Newbie
Posts: 11
Joined: Thu Nov 08, 2007 5:40 am

Post by Andromeda »

No, not realy, but i have been searching this forums sins you posted it, but i haven't be ablem to find anything that was able to help, could you maby give me a like to the libary you are talking about
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There are multiple libraries available that are Access Control Lists. GACL has been mentioned before here.
Post Reply