thank you, this works allready.
now there is another problem with the http authentication adapter (digest).
also if i use the data from the Unittest i can't get a successful login,
the login dialog allways pop up again after pressing "OK". only
"chancel" hides the login dialog and shows the page.
i've created a post for this.
best regards,
Truppe Steven
Senmiao Liu wrote:
> 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
> <http://devzone.zend.com/article/1665-Zend_Acl-Zend_Auth-Example-Scenario>
>
> 2007/9/1, Truppe Steven <[EMAIL PROTECTED]
> <mailto:[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 <http://Ethos.com.cn>