RoleCheck constructor
Create a new RoleCheck that succeeds if the user that created the context has role
.
You might also be interested in:
- RoleCheck.id, for creating this same check without an instance of Role;
- RoleCheck.any, for checking that the user that created a context has one of a set or roles.
Implementation
RoleCheck(Role role, {String? name}) : this.id(role.id, name: name);