src/ViKon/Auth/Guard.php
public function hasPermissions($permissions)
    {
        if ($this->user() === null) {
            return null;
        }

        if (!is_array($permissions)) {
            $permissions = func_get_args();
        }

        // Count permissions because user need user to have all permissions passed as parameter
        return count(array_intersect($permissions, $this->permissions)) === count($permissions);
    }
public function hasPermissions($permissions)
    {
        if ($this->user() === null) {
            return null;
        }

        if (!is_array($permissions)) {
            $permissions = func_get_args();
        }

        // Count permissions because user need user to have all permissions passed as parameter
        return count(array_intersect($permissions, $this->permissions)) === count($permissions);
    }
public function hasPermissions ( $ permissions ) { if ( $ this -> user ( ) === null ) { return null ; } if ( ! is_array ( $ permissions ) ) { $ permissions = func_get_args ( ) ; } // Count permissions because user need user to have all permissions passed as parameter return count ( array_intersect ( $ permissions , $ this -> permissions ) ) === count ( $ permissions ) ; }
Check if authenticated user has all permission passed by parameter

@param string[] $permissions

@return bool|null return NULL if user is not authenticated
Check if authenticated user has all permission passed by parameter