November Happy Hour will be moved to Thursday December 5th.

Class PermissionRepository

Repository for permissions to functions

Inheritance
System.Object
PermissionRepository
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public abstract class PermissionRepository : Object

Constructors

PermissionRepository()

Declaration
protected PermissionRepository()

Methods

DeletePermissions(SecurityEntity)

Clears all permissions for a given user/role

Declaration
public virtual void DeletePermissions(SecurityEntity entity)
Parameters
Type Name Description
SecurityEntity entity

The user/role

DeletePermissionsAsync(SecurityEntity)

Clears all permissions for a given user/role

Declaration
public virtual Task DeletePermissionsAsync(SecurityEntity entity)
Parameters
Type Name Description
SecurityEntity entity

The user/role

Returns
Type Description
System.Threading.Tasks.Task

GetPermissions(PermissionType)

Gets all roles/users that have the specified permission type

Declaration
public virtual IEnumerable<SecurityEntity> GetPermissions(PermissionType type)
Parameters
Type Name Description
PermissionType type

The permission type

Returns
Type Description
System.Collections.Generic.IEnumerable<SecurityEntity>

A list of roles/users assigned to a permission type

GetPermissionsAsync(PermissionType)

Gets all roles/users that have the specified permission type

Declaration
public virtual Task<IEnumerable<SecurityEntity>> GetPermissionsAsync(PermissionType type)
Parameters
Type Name Description
PermissionType type

The permission type

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<SecurityEntity>>

A list of roles/users assigned to a permission type

SavePermissions(PermissionType, IEnumerable<SecurityEntity>)

Save roles/users for the specified permission type

Declaration
public virtual void SavePermissions(PermissionType type, IEnumerable<SecurityEntity> entities)
Parameters
Type Name Description
PermissionType type

The permission type

System.Collections.Generic.IEnumerable<SecurityEntity> entities

The list or roles/users for the permission type

SavePermissionsAsync(PermissionType, IEnumerable<SecurityEntity>)

Save roles/users for the specified permission type

Declaration
public virtual Task SavePermissionsAsync(PermissionType type, IEnumerable<SecurityEntity> entities)
Parameters
Type Name Description
PermissionType type

The permission type

System.Collections.Generic.IEnumerable<SecurityEntity> entities

The list or roles/users for the permission type

Returns
Type Description
System.Threading.Tasks.Task

Extension Methods