Hi Steven,

You can try this in you plugin:

public functino preDispatch($request)
{
    auth code...
    ...
    if(!$this->_acl->isAllowed($role, $resource, $action))
    {
            $request->setModuleName('default');
            $request->setControllerName('index');
            $request->setActionName('login');
    }
    ....
}

And here's a good example:
http://devzone.zend.com/article/1665-Zend_Acl-Zend_Auth-Example-Scenario

2007/9/1, Truppe Steven <[EMAIL PROTECTED]>:
>
> i'm on writing a simple Zend_Acl&Zend_Auth Plugin that checks in
> preDispatch() if there are any rules for resources related to the actual
> module/controller/action.
>
> this all works fine, my question now is how can i forward to the
> controller:admin action:login if i find that the current user needs to
> login because he has not enouth permissions set ?
>
> I also want to handle the Error stuff inside postDispatch(). So if there
> is an exception it forwards to model:default, controller:Error,
> action:customerror.
>
> There is a method called _forward but i can't remember how to use it and
> in which context i have use it.
>
>
> best regards,
> Truppe Steven
>
>


-- 
Cheers
Senmiao Liu

Ethos.com.cn

Reply via email to