protected function grant($permissions, $action)
    {
        $key = $this->getKey($action);
        $grant = (($permissions & $key) == $key);

        return $grant;
    }
protected function grant($permissions, $action)
    {
        $key = $this->getKey($action);
        $grant = (($permissions & $key) == $key);

        return $grant;
    }
protected function grant ( $ permissions , $ action ) { $ key = $ this -> getKey ( $ action ) ; $ grant = ( ( $ permissions & $ key ) == $ key ) ; return $ grant ; }
Checks if the provided action is allowed when using the provided permissions code.

@param int $permissions A permissions code to check if access could be granted
@param string  $action      The action to test check if granted

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE if the action should be allowed, otherwise FALSE
@access protected
Checks if the provided action is allowed when using the provided permissions code .