Hi Mat,

You might try something like the following:

$request->setControllerName('access')
        ->setActionName('denied')
        ->setDispatched(false);

Hope that helps!

Best regards,
Darby

Mathew Byrne wrote:
> I'm attempting to implement a security system as a Controller plugin. On
> each request the preDispatch function checks if a current user is logged
> in and then checks their permissions against a list of pages they have
> access to.
> 
> Is there a good method properly skip the dispatching of the action if
> they do not have access? I tried throwing an Exception however if
> $front->throwExceptions () is true then the exception is caught, stored
> in the response object and the action is still dispatched.
> 
> Can anyone suggest a better method that does NOT allow the action to be
> dispatched?
> 
> Mat Byrne
> 

Reply via email to