Hi

I have written a plugin to check against an ACL list and provide a boolean response as to whether the user can at least view the desired page.

$controller->setControllerDirectory(array(
  'default' => $config->controller . 'controllers',
  'users'   => 'modules/users/controllers'))
           ->registerPlugin(new Zend_Plugin_Auth())
           ->throwExceptions(true);

In plugin truncated:

    public function preDispatch($request)
    {
        // Simply see if the User Type can view this page.
$access = $acl->isAllowed($type, $request->getParam('controller'), 'view');

        if (!$access) {
            //echo 'No Access';
            return false;
        } else {
            //echo 'Access';
            return true;
        }


Now my issue is how do I then translate this into the controller to allow access or redirect away from the desired controller/action.

My other issue is caching the ACL list of something so that it isnt generated on each subsequent request, I can see something about serialised PHP in the manul but no concrete instructions are given on best practices.

Any tutorial links on this welcome, but a lot of them on the net are now quite old and dont use 0.8+

Cheers

Ian

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to