View Full Version : Dynamic permissions (users, groups, permissions)

03-24-2009, 10:58 AM
Hi Guys,

I have a custom content management system. this CMS has content divided in 3 menus. Table struct looks somewhat like

table cms -> page_id int, menu enum(menu1, menu2, menu3), content text

I also have user, group, permission, user_permission, and group_permission tables to manage access control. In permission table I have some permissions like acess_menu1, access_menu2 etc ..

When a user is created, admin selects the group for the user which are premium_users, temp_users etc) premium users have access to all menus etc)

so when a user logs in I just retrieve his/her permissions and based upon these permission relevant menu pages are presented to user.

Now admin wants the functionality to create new pages in content and controll access to that pages. For example, to allow temp_users access to all menus but for not all pages.

This is where my problem starts as this is something dynamic. Can you guys help/guide me how to make it work?? Any input will be highly appreciated.