What is the best way to set up module based ACL in zend Framework?
This post has NOT been accepted by the mailing list yet.
I have 2 types of users, guest and user. I have created 2 modules, admin and foobar, and in addition to it, there is a front end with default module. I want user to logged in before accessing any controller from admin/foobar modules but can access front end without login. The thing is that i am not getting any suitable article to learn on how to set up module based acl in zend framework.
Re: What is the best way to set up module based ACL in zend Framework?
Probably the most direct way would be to instead of checking the name of the controller against resources in the ACL, check the module_controller name. So the default module index controller would be default_index, admin module index controller would be admin_index, etc.
You'll need to change your ACL definition to match the new names, and you'll need at least 1 entry for each controller of each module, but you get to stay with your current implementation of the ACL and you keep control on each module / controller / action.