public function hasPrivilege($privilege, $current = true)
    {
        if (! $this->acl) {
            return true;
        }
        $role = $this->getRole($current);

        return $this->acl->isAllowed($role, null, $privilege);
    }
public function hasPrivilege($privilege, $current = true)
    {
        if (! $this->acl) {
            return true;
        }
        $role = $this->getRole($current);

        return $this->acl->isAllowed($role, null, $privilege);
    }
public function hasPrivilege ( $ privilege , $ current = true ) { if ( ! $ this -> acl ) { return true ; } $ role = $ this -> getRole ( $ current ) ; return $ this -> acl -> isAllowed ( $ role , null , $ privilege ) ; }
Returns true if the role of the current user has the given privilege

@param string $privilege
@param boolean $current Checks value for current role (when false for normal role);
@return bool
Returns true if the role of the current user has the given privilege