Checks if the user has the specified role, regardless of the scope.

  • Parameters

    • role: string

      The role to check.

    • userId: string

      The ID of the user.

    Returns Promise<boolean>

    Resolves to true if the user has the role, otherwise false.