09-02-2009, 12:52 PM
|
#1 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Access Control List(s)?
Hey!
I'm wondering how to best achieve this thing that I want for my CMS.
First of all, I want to be able to via the code decide what pages that can be viewed by what user based on usergroup and userstatus.
An example is that some pages I want everyone to be able to see. Some pages I want only logged in members to see. And some pages I want logged in members with the usergroup of premium member(and higher) to see.
Secondly, I want to be able to decide what features that can be USED by what user based on usergroup.
An example is that .. say I have a feature called image statistic that shows the latest users who viewed another user's image in his gallery. I maybe only want admins to be able to use this feature.
And thirdly, I want the users to decide the permissions they want to use on their profile/gallery aswell.
And example is.. Say I've activated the feature image statistic for members(and higher). Then they will have access to that part of the control panel in their usercp. But I want to allow them to set who can view that "widget" on their profile/gallery. Some of the users might only want themselves to be able to see it. Some might want their friends to be able to see it. Some might want logged in users to see it. And some might want to allow this widget to be seen on their profile/gallery by guests(not logged in) - obviously only possible if the page is allowed to be viewed by guests.
Obviously, I want the users to be able to set who can view their gallery/profile aswell.
So basically, it's 4 lines of access controls.
1. I want to define what pages can be viewed by what user based on usergroup and userstatus.
2. I want to define what widgets can be used by what user based on usergroup.
3. I want users to be able to define what members can view their profile/gallery.
4. I want users to be able to define what widgets they want to use from a list of available widgets they are ALLOWED to use(read #2).
Okay, long post that leads to nothing.. or does it?
I'm wondering how I can create this the best way that provides easy to use functions that runs the checks matching the criterias above.
__________________
|
|
|
|