public function getAllPermissions()
    {
        $permissions = [];

        // Gather and combine all permissions for roles
        foreach ($this->roleModel->all() as $role) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($role->getPermissions()))
            );
        }

        // Gather permissions set specifically for users
        foreach ($this->userModel->all() as $user) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($user->getPermissions()))
            );
        }

        sort($permissions);

        return array_unique($permissions);
    }
public function getAllPermissions()
    {
        $permissions = [];

        // Gather and combine all permissions for roles
        foreach ($this->roleModel->all() as $role) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($role->getPermissions()))
            );
        }

        // Gather permissions set specifically for users
        foreach ($this->userModel->all() as $user) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($user->getPermissions()))
            );
        }

        sort($permissions);

        return array_unique($permissions);
    }
public function getAllPermissions ( ) { $ permissions = [ ] ; // Gather and combine all permissions for roles foreach ( $ this -> roleModel -> all ( ) as $ role ) { $ permissions = array_merge ( $ permissions , array_keys ( array_filter ( $ role -> getPermissions ( ) ) ) ) ; } // Gather permissions set specifically for users foreach ( $ this -> userModel -> all ( ) as $ user ) { $ permissions = array_merge ( $ permissions , array_keys ( array_filter ( $ user -> getPermissions ( ) ) ) ) ; } sort ( $ permissions ) ; return array_unique ( $ permissions ) ; }
Returns all permissions known by the authenticator.

@todo This should be cached

@return string[]
Returns all permissions known by the authenticator .