Interface IPermissionChecker
The service used to checking permission authorizations.
Namespace: OpenMod.API.Permissions
Assembly: OpenMod.API.dll
Syntax
public interface IPermissionChecker
Properties
| Improve this Doc View SourcePermissionCheckProviders
Gets the permission check providers.
Declaration
IReadOnlyCollection<IPermissionCheckProvider> PermissionCheckProviders { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IPermissionCheckProvider> |
PermissionStores
Gets the permission sources.
Declaration
IReadOnlyCollection<IPermissionStore> PermissionStores { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IPermissionStore> |
Methods
| Improve this Doc View SourceCheckPermissionAsync(IPermissionActor, String)
Checks if an actor has authorization to execute an action.
Declaration
Task<PermissionGrantResult> CheckPermissionAsync(IPermissionActor actor, string permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionActor | actor | The actor to check. |
System.String | permission | The permission to check. |
Returns
Type | Description |
---|---|
Task<PermissionGrantResult> |
InitAsync()
Initializes the permission checker.
Declaration
Task InitAsync()
Returns
Type | Description |
---|---|
Task |
Remarks
This method is for internal usage only and should not be called by plugins.