RoleGuard class

A utility class for evaluating role-based access rules.

Constructors

RoleGuard()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

hasAllRoles(List<String> userRoles, List<String> requiredRoles) bool
Returns true only if the user has all of the required roles.
hasAnyRole(List<String> userRoles, List<String> requiredRoles) bool
Returns true if the user has at least one of the required roles.