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

@param string $privilege
@param string $role
@return bool
@deprecated Since 1.7.2 Replaced by $this->currentUser->hasPrivilege();
Returns true if the given role or role of the current user has the given privilege