Permission class

Set the permissions for each module.

Constructors

Permission({bool enabled = false, List<String>? edit, List<String>? watch, List<String>? delete})
Set the permissions for each module.
const

Properties

delete List<String>?
Deletion Authority.
final
edit List<String>?
Editing privileges.
final
enabled bool
If you want to enable privilege management, use true.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
watch List<String>?
Viewing privileges.
final

Methods

canDelete(String role) bool
If role has delete permissions, true.
canEdit(String role) bool
If role has edit permissions, true.
canWatch(String role) bool
If role has watch permissions, true.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → dynamic
Convert the permission to DynamicMap.
toString() String
A string representation of this object.
inherited

Operators

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