Interface IAuthorisation
Implemented by plugins to provide an access control policy.
public interface IAuthorisation
Properties
IsAuthoritative
If true, roles can be determined without async access to a remote server.
bool IsAuthoritative { get; }
Property Value
Remarks
May depend on ambient state - don't cache the result.
Methods
GetDefaultPermissions(CallbackEnvironment)
The rights assigned to all users regardless of their roles.
PermissionSet GetDefaultPermissions(CallbackEnvironment environment)
Parameters
environmentCallbackEnvironment
Returns
GetIdentityRoles(CallbackEnvironment, Identity)
The roles assigned to a user. Available synchronously only if IsAuthoritative returns true.
IReadOnlySet<Role> GetIdentityRoles(CallbackEnvironment environment, Identity subject)
Parameters
environmentCallbackEnvironmentsubjectIdentity
Returns
GetIdentityRolesAsync(CallbackEnvironment, IEntityContext, Identity)
The roles assigned to a user.
Task<IReadOnlySet<Role>> GetIdentityRolesAsync(CallbackEnvironment environment, IEntityContext scopedContext, Identity subject)
Parameters
environmentCallbackEnvironmentscopedContextIEntityContextsubjectIdentity
Returns
GetRolePermissions(CallbackEnvironment, Role)
The rights assigned to a role (which may be in turn be assigned to users or groups).
PermissionSet GetRolePermissions(CallbackEnvironment environment, Role role)
Parameters
environmentCallbackEnvironmentroleRole