I spent the day looking for tutorials and answers about how to implement Zend_Acl here at SO as in other sites. And I got a headache. :X
I saw people using it to allow or disallow access to certain controllers/actions and others saying that this way is incorrect, and that should allow or disallow access based on models. Huh, the second appears feasible, however, this means that for every controller I need a model? Because it seems, following the second alternative, I'll only be able to block user access at the moment it is, for example, editing a post. But I would like to prevent access to the action of the controller which edits the post.
If I want to block access to the user with role X to the action Y of the controller Z, how would I do that if I follow the second alternative?
An example of a real application would be very welcome.
This information can improve your answers: I use Doctrine 2 as ORM, and I have a module Admin. The actual structure of my application is like this:
application
- MYAPP
- configs
- controllers
- layouts
- views
- library
- MYAPP ;This folder is in the include path
- modules
- admin