Hi till, Thanks for the reply.
I'll take that under consideration. Probably in order to have some sort of standard I will probably define that all admin actions for a given 'module' will be put under a AdminSomethingController and put in init the Zend_Auth/Acl to control the access to authenticated/authorized users. - rb On 9/26/07, till <[EMAIL PROTECTED]> wrote: > > On 9/26/07, robert mena <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am migrating my regular apps to use ZF's MVC. Currently I have an > admin > > directory where I put all my php that perform administration actions and > > protect this admin with a .htaccess. > > > > Ex. a news module > > > > /var/www/html/news.php > > /var/www/html/admin/news/search.php add.php update.php > > delete.php > > > > I already have all action in a controller and they are working fine but > I > > need to do something in order to : > > a) force the admin actions to require authentication. I already know > how to > > use Zend_Auth, but need to force this for several actions if possible > > without repeating myself. Should I put in init()? > > I think I put mine in preDispatch() but init() should work as well. > > > b) find out if it's better to have two separate controllers one for > > 'outside' usage NewsController = i.e see the news, send comments, and > other > > AdminNewsController for all administrative tasks. > > You could make the actions and use Zend_Acl - at least that is what I > would do if it's not too big of a project. If there is a lot of > backend stuff to be done it might make also sense to do another > NewsController - if complexity requires it. > > > Cheers, > Till >
