SimpleAccessControl class
A simple implementation of the access control.
It assumes the user object has a getter called roles
which returns
a collection of roles (Iterable<String>
).
Each role is represented as a string.
For better performance, it is suggested to be Set<String>
.
- Implemented types
Constructors
-
SimpleAccessControl([Map<
String, Iterable< ? mapping])String> >
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
-
add(
String uri, Iterable< String> roles) → void - Adds a protected resource. *
-
canAccess(
HttpConnect connect, dynamic user) → FutureOr< bool> -
Test if the given request is accessible by the given user.
*
override
-
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