Checks if the user has the specified role for a given scope.

  • Parameters

    • role: string

      The role to check.

    • userId: string

      The ID of the user.

    • Optionalscope: string = null

      The scope in which to check the role (default: null).

    Returns Promise<boolean>

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