classes/BearCMS/CurrentUser.php
public function hasPermission(string $name): bool
    {
        $permissions = $this->getPermissions();
        if (array_search('all', $permissions) !== false) {
            return true;
        }
        return array_search($name, $permissions) !== false;
    }
public function hasPermission(string $name): bool
    {
        $permissions = $this->getPermissions();
        if (array_search('all', $permissions) !== false) {
            return true;
        }
        return array_search($name, $permissions) !== false;
    }
public function hasPermission ( string $ name ) : bool { $ permissions = $ this -> getPermissions ( ) ; if ( array_search ( 'all' , $ permissions ) !== false ) { return true ; } return array_search ( $ name , $ permissions ) !== false ; }
Checks whether the current logged in user has the specified permission

@param string $name The name of the permission
@return boolean TRUE if the current logged in user has the permission specified, FALSE otherwise
@throws \InvalidArgumentException
Checks whether the current logged in user has the specified permission