Welcome Guest, Not a member yet? Register   Sign In
Basic Permissions System - Permission Class (on wiki)
#2

[eluser]drewbee[/eluser]
Hey, very nice. This looks very similar to something I have done. On top of this, mine does the following:

- User specific permissions (based off of account ID) take precedence over any group permissions. Might be a nice little trinket to throw in.

- the 'systems' in mine are completely based off of the directory > controller > method > {arg}1, {arg}2..., with method having the highest say in permissions (ex. it will over ride directory if view is set to false at directory level but set to true at method level).

As an example, lets say we have the structure admin/edit_user/profile/{id}

I can set the usergroup 'administrators' to have the permission 'view' at the system level of 'admin/', which will now be inherited all the way down to {id}.

This is nice because I do not have to define each directory, controller, method etc with permissions (unless I want too), as it is simply inherited down the path.

I could also set it up to have the administrators be able to view the edit user profile page except for ID 23 as an example.

Only downside to my little system here is though it is all done in 1 query, the complexity of the query increases with each 'ci' directory that exists (figuring out what takes precedence etc).


Just some thoughts for you to mull around in your head!! Smile


Messages In This Thread
Basic Permissions System - Permission Class (on wiki) - by El Forum - 03-19-2009, 04:06 AM
Basic Permissions System - Permission Class (on wiki) - by El Forum - 03-19-2009, 09:25 AM
Basic Permissions System - Permission Class (on wiki) - by El Forum - 05-25-2009, 01:45 AM
Basic Permissions System - Permission Class (on wiki) - by El Forum - 05-25-2009, 02:36 AM
Basic Permissions System - Permission Class (on wiki) - by El Forum - 05-25-2009, 02:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB