Show / Hide Table of Contents

Class PermissionStore

Inheritance
object
PermissionStore
Implements
IPermissionStore
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.PermissionManagement
Assembly: Volo.Abp.PermissionManagement.Domain.dll
Syntax
public class PermissionStore : IPermissionStore, ITransientDependency

Constructors

PermissionStore(IPermissionGrantRepository, IDistributedCache<PermissionGrantCacheItem>, IPermissionDefinitionManager)

Declaration
public PermissionStore(IPermissionGrantRepository permissionGrantRepository, IDistributedCache<PermissionGrantCacheItem> cache, IPermissionDefinitionManager permissionDefinitionManager)
Parameters
Type Name Description
IPermissionGrantRepository permissionGrantRepository
IDistributedCache<PermissionGrantCacheItem> cache
IPermissionDefinitionManager permissionDefinitionManager

Properties

Cache

Declaration
protected IDistributedCache<PermissionGrantCacheItem> Cache { get; }
Property Value
Type Description
IDistributedCache<PermissionGrantCacheItem>

Logger

Declaration
public ILogger<PermissionStore> Logger { get; set; }
Property Value
Type Description
ILogger<PermissionStore>

PermissionDefinitionManager

Declaration
protected IPermissionDefinitionManager PermissionDefinitionManager { get; }
Property Value
Type Description
IPermissionDefinitionManager

PermissionGrantRepository

Declaration
protected IPermissionGrantRepository PermissionGrantRepository { get; }
Property Value
Type Description
IPermissionGrantRepository

Methods

CalculateCacheKey(string, string, string)

Declaration
protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)
Parameters
Type Name Description
string name
string providerName
string providerKey
Returns
Type Description
string

GetCacheItemAsync(string, string, string)

Declaration
protected virtual Task<PermissionGrantCacheItem> GetCacheItemAsync(string name, string providerName, string providerKey)
Parameters
Type Name Description
string name
string providerName
string providerKey
Returns
Type Description
Task<PermissionGrantCacheItem>

GetCacheItemsAsync(string[], string, string)

Declaration
protected virtual Task<List<KeyValuePair<string, PermissionGrantCacheItem>>> GetCacheItemsAsync(string[] names, string providerName, string providerKey)
Parameters
Type Name Description
string[] names
string providerName
string providerKey
Returns
Type Description
Task<List<KeyValuePair<string, PermissionGrantCacheItem>>>

GetPermissionNameFormCacheKeyOrNull(string)

Declaration
protected virtual string GetPermissionNameFormCacheKeyOrNull(string key)
Parameters
Type Name Description
string key
Returns
Type Description
string

IsGrantedAsync(string, string, string)

Declaration
public virtual Task<bool> IsGrantedAsync(string name, string providerName, string providerKey)
Parameters
Type Name Description
string name
string providerName
string providerKey
Returns
Type Description
Task<bool>

IsGrantedAsync(string[], string, string)

Declaration
public virtual Task<MultiplePermissionGrantResult> IsGrantedAsync(string[] names, string providerName, string providerKey)
Parameters
Type Name Description
string[] names
string providerName
string providerKey
Returns
Type Description
Task<MultiplePermissionGrantResult>

SetCacheItemsAsync(string, string, List<string>)

Declaration
protected virtual Task<List<KeyValuePair<string, PermissionGrantCacheItem>>> SetCacheItemsAsync(string providerName, string providerKey, List<string> notCacheKeys)
Parameters
Type Name Description
string providerName
string providerKey
List<string> notCacheKeys
Returns
Type Description
Task<List<KeyValuePair<string, PermissionGrantCacheItem>>>

SetCacheItemsAsync(string, string, string, PermissionGrantCacheItem)

Declaration
protected virtual Task SetCacheItemsAsync(string providerName, string providerKey, string currentName, PermissionGrantCacheItem currentCacheItem)
Parameters
Type Name Description
string providerName
string providerKey
string currentName
PermissionGrantCacheItem currentCacheItem
Returns
Type Description
Task

Implements

IPermissionStore
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform