Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-07-2008, 04:28 PM
Junior Member
 
Join Date: Mar 2008
Posts: 6
Default Zend_Acl with arbitrary number of resources

How would you handle setting up Zend_Acl to handle situtation where all the resources are not known at "compile" time...for example if the resources are a controller name + an id.
Let's say you had a database of organizations and events, and obviously one organization cannot access the edit page of another organizations events. Obviously, it would be ridiculous to add a resource event/1, event/2, ad infinitum.
Currently, i'm using a controller plugin to check my ACL list at preDispatch time (as an aside: is there any other of doing this? Not that I don't like this method, i would just like to know what other folks are doing). I was thinking to check if the controller is "event", then to check the param against the database to see if the user has permissions, and just have one resource "event" in my ACL.
I had first thought to use an assertion, but I'm not sure how i would go about this, seeing as I don't have access to the id information at that point (unless I pass it to the assertion object, through the ACL object, etc., which just doesn't sound right to me).

Either way, it seems to me that I can't be the first one to think of this issue, so does anybody have any experience in this area?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:38 PM.