Checks if the user has the specified role for a given scope.
The role to check.
The ID of the user.
Optional
The scope in which to check the role (default: null).
null
Resolves to true if the user has the role in the given scope, otherwise false.
true
false
Checks if the user has the specified role for a given scope.