public function hasPermission($action)
    {
        if ($this->hasAction($action) === true) {
            $result = $this->grant($this->getPermissions(), $action);

        } else {
            throw new Doozr_Exception_Service('Action "'.$action.'" does not exist!');
        }

        return $result;
    }
public function hasPermission($action)
    {
        if ($this->hasAction($action) === true) {
            $result = $this->grant($this->getPermissions(), $action);

        } else {
            throw new Doozr_Exception_Service('Action "'.$action.'" does not exist!');
        }

        return $result;
    }
public function hasPermission ( $ action ) { if ( $ this -> hasAction ( $ action ) === true ) { $ result = $ this -> grant ( $ this -> getPermissions ( ) , $ action ) ; } else { throw new Doozr_Exception_Service ( 'Action "' . $ action . '" does not exist!' ) ; } return $ result ; }
Checks whether or not the permission as string is allowed by current setup.

@param string $action The action to be tested for

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE if allowed (has permission), otherwise FALSE
@access public
@throws Doozr_Exception_Service
Checks whether or not the permission as string is allowed by current setup .