AuthAdminMutationAuthorization class final

Immutable authorization policy carried into a backend-owned admin command.

The backend reloads actorId after entering its transaction and evaluates every requirements entry against that authoritative user. Explicit administrator IDs receive the built-in admin role. Role-based administrators retain only the permissions assigned to their actual roles.

Constructors

AuthAdminMutationAuthorization({required String actorId, required Iterable<String> administratorRoles, required Iterable<String> administratorUserIds, required Map<String, AuthAdminPermissionSet> rolePermissions, required Iterable<AuthAdminPermissionRequirement> requirements})
Creates an instance of AuthAdminMutationAuthorization.

Properties

actorId String
The identifier of actor.
final
administratorRoles Set<String>
The roles assigned to this value.
final
administratorUserIds Set<String>
The administrator user ids associated with this value.
final
hashCode int
The hash code for this object.
no setterinherited
requirements List<AuthAdminPermissionRequirement>
The requirements associated with this value.
final
rolePermissions Map<String, Map<String, List<String>>>
The roles assigned to this value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allows(AuthUser actor, {Iterable<AuthAdminPermissionRequirement>? additionalRequirements}) bool
Checks whether the requested operation is authorized.
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