Hi,

I use assertions in my ACL.
For example:
        $this->allow('member', 'vehicle', 'index', new
belongsToMeAssertion());

This permission states that the vehicle list is allowed to the "member" role
if the vehicle belongs to a specific user (in fact, the user that is logged
in).
Consequently, in the requested URL (for example "/vehicle/index/user/john")
the "user" parameter must match the user id stored int the Zend_Auth storage
object.

When the user logs into the application, a menu is built dynamically
depending on its privileges.
To do so, I look into the application resources and test if the resource
isAllowed().
But the login URL doesn't include the parameter the assertion expects and
every permission containing an assertion fails.

What would you suggest to solve this use case?



-----
Guillaume ORIOL
Sofware architect
Technema
-- 
View this message in context: 
http://www.nabble.com/best-practice-to-build-a-menu-dynamically-depending-on-ACL-with-assertions-tp25120101p25120101.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to