OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Class PermissionChecker

Inheritance
System.Object
PermissionChecker
Implements
IPermissionChecker
IAsyncDisposable
Namespace: OpenMod.Core.Permissions
Assembly: OpenMod.Core.dll
Syntax
public class PermissionChecker : object, IPermissionChecker, IAsyncDisposable

Constructors

| Improve this Doc View Source

PermissionChecker(ILifetimeScope, IPermissionRegistry, IOptions<PermissionCheckerOptions>, ILogger<PermissionChecker>)

Declaration
public PermissionChecker(ILifetimeScope lifetimeScope, IPermissionRegistry permissionRegistry, IOptions<PermissionCheckerOptions> options, ILogger<PermissionChecker> logger)
Parameters
Type Name Description
ILifetimeScope lifetimeScope
IPermissionRegistry permissionRegistry
IOptions<PermissionCheckerOptions> options
ILogger<PermissionChecker> logger

Properties

| Improve this Doc View Source

PermissionCheckProviders

Declaration
public IReadOnlyCollection<IPermissionCheckProvider> PermissionCheckProviders { get; }
Property Value
Type Description
IReadOnlyCollection<IPermissionCheckProvider>
| Improve this Doc View Source

PermissionStores

Declaration
public IReadOnlyCollection<IPermissionStore> PermissionStores { get; }
Property Value
Type Description
IReadOnlyCollection<IPermissionStore>

Methods

| Improve this Doc View Source

CheckPermissionAsync(IPermissionActor, String)

Declaration
public Task<PermissionGrantResult> CheckPermissionAsync(IPermissionActor actor, string permission)
Parameters
Type Name Description
IPermissionActor actor
System.String permission
Returns
Type Description
Task<PermissionGrantResult>
| Improve this Doc View Source

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask
| Improve this Doc View Source

InitAsync()

Declaration
public Task InitAsync()
Returns
Type Description
Task

Implements

IPermissionChecker
IAsyncDisposable

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)