Table of Contents

Class PermissionManager

Namespace
Dynamicweb.Security.Permissions
Assembly
Dynamicweb.Core.dll

Provides methods for retrieving and managing permissions within the current permission context.

public static class PermissionManager
Inheritance
PermissionManager
Inherited Members

Methods

GetExplicitPermissionsByType<T>()

Gets all explicit permissions for the specified entity type.

public static IEnumerable<Permission> GetExplicitPermissionsByType<T>() where T : IPermissionEntity

Returns

IEnumerable<Permission>

Permissions for the specified entity type, if found; otherwise, an empty sequence.

Type Parameters

T

Permission entity type to get permissions for

GetPermissionIdentifier(IPermissionEntity)

public static PermissionEntityIdentifier? GetPermissionIdentifier(IPermissionEntity entity)

Parameters

entity IPermissionEntity

Returns

PermissionEntityIdentifier

GetPermissionLevel(IPermissionEntity)

Gets the permission level for the specified entity.

public static PermissionLevel GetPermissionLevel(IPermissionEntity entity)

Parameters

entity IPermissionEntity

Entity to get permission for

Returns

PermissionLevel

Permission level

HasPermissionLevel(IPermissionEntity, PermissionLevel)

Checks the current permission level for the specified entity.

public static bool HasPermissionLevel(IPermissionEntity entity, PermissionLevel level)

Parameters

entity IPermissionEntity

Permission entity

level PermissionLevel

Permission level

Returns

bool

true, if the specified permission level is satisfied by current permission; otherwise, false.

To top