public function isAllowed(Doozr_Acl_Service $acl, $action)
    {
        if ($this->getType() === self::TYPE_CONSUMER && $acl->getType() === self::TYPE_PROVIDER) {
            return ($acl->hasPermission($action) && $acl->grant($this->getPermissions(), $action));

        } else {
            throw new Doozr_Exception_Service(
                'Type mismatch! Only Consumer ca be allowed to access Provider.'
            );
        }
    }
public function isAllowed(Doozr_Acl_Service $acl, $action)
    {
        if ($this->getType() === self::TYPE_CONSUMER && $acl->getType() === self::TYPE_PROVIDER) {
            return ($acl->hasPermission($action) && $acl->grant($this->getPermissions(), $action));

        } else {
            throw new Doozr_Exception_Service(
                'Type mismatch! Only Consumer ca be allowed to access Provider.'
            );
        }
    }
public function isAllowed ( Doozr_Acl_Service $ acl , $ action ) { if ( $ this -> getType ( ) === self :: TYPE_CONSUMER && $ acl -> getType ( ) === self :: TYPE_PROVIDER ) { return ( $ acl -> hasPermission ( $ action ) && $ acl -> grant ( $ this -> getPermissions ( ) , $ action ) ) ; } else { throw new Doozr_Exception_Service ( 'Type mismatch! Only Consumer ca be allowed to access Provider.' ) ; } }
Checks whether the provider can be accessed by this consumer.

@param Doozr_Acl_Service $acl    The provider ACL
@param string            $action The action to check

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE if is allowed, otherwise FALSE
@access public
@throws Doozr_Exception_Service
Checks whether the provider can be accessed by this consumer .