NiceRbacService class

RBAC authorization service — checks permissions for the current user.

Constructors

NiceRbacService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userPermissions List<String>
Get all permissions as a flat list of strings.
no setter

Methods

hasAllPermissions(List<String> permissions) bool
Check if user has ALL given permissions.
hasAnyPermission(List<String> permissions) bool
Check if user has ANY of the given permissions.
hasPermission(String resource, NiceRbacAction action) bool
Check if the current user has a specific permission.
hasPermissionString(String permission) bool
Check permission by string (e.g., "products.read").
loadRoles(List<Map<String, dynamic>> rolesJson) → void
Load roles configuration from JSON.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setUserRoles(List<String> roleIds) → void
Set the current user's active roles.
toString() String
A string representation of this object.
inherited

Operators

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