Access Control List(s)?
View Single Post
09-02-2009, 08:09 PM
Join Date: Mar 2009
Originally Posted by
Because I think that will be the best solution for what I want to accomplish.
What if I have a feature called "blog", that would go into the resource "blog". Then also, I have a page called "blog", that would also be a resource "blog" - but wait, that won't work.. It already exists!
And lastly, how do I store the permissions set by the owner of the blog into the "blog"(as used in $perm->canSee() function which checks if the viewing user can see the "blog" in this case, based on the permission set by the owner)? I can't store it as a resource.. because there are already 2 other "blog" resources..
That is, in my opinion, a flawed system. But maybe I've misunderstood how to use this..
Thanks! I'll check it out!
Yes this is true,
But you would only need to setup the resources in a different named manner.
For your blog example
Each blog "owner would have say"
23_blog - 23 being their userId
Which then permissions can be set, it may seem a bit more complicated but it would be fairly the same as a naming convention that can be easily modified to suit your needs rather than having multiple methods that perform the same logic, which once your code starts scaling could lead to future bugs.
A few more examples would be
-> Resource:: UserId -> 23 Blog PostId -> 415 Comment editing
-> Resource:: About me page viewing
-> Resource:: WidgetId->25 UserId -> 15 Viewing
Need freelance Work?
I've been developing 5 years now, and I learn something new everyday
View Public Profile
Send a private message to ioan1k
Visit ioan1k's homepage!
Find More Posts by ioan1k