Table of Contents

Class UnifiedPermission

Namespace
Dynamicweb.Security.Permissions
Assembly
Dynamicweb.Security.dll
Model representation of permission data from the storage. Immutable
public class UnifiedPermission
Inheritance
UnifiedPermission
Inherited Members

Constructors

UnifiedPermission(int, string, string, string, string, PermissionLevel)

Instantiates a permission level for a user on an identifier.
public UnifiedPermission(int id, string userId, string key, string name, string subName, PermissionLevel permission)

Parameters

id int
id
userId string
userId
key string
key
name string
name
subName string
subName
permission PermissionLevel
permission level

Properties

Key

Identifier associated with "something" that can get a permission.
public string Key { get; }

Property Value

string
key

Name

Name of type that is affected by permission.
public string Name { get; }

Property Value

string
name

Examples

"Page", "Paragraph", "Item", "MyOwnCustomType" etc.

Permission

Permission level that describes what is allowed.
public PermissionLevel Permission { get; }

Property Value

PermissionLevel
permission

PermissionId

Internal id for mapping to storage.
public int PermissionId { get; }

Property Value

int

SubName

Name of derived information related to the type targeted by Name. Name="Page", SubName="Sort" gives permissions for the Sort field
public string SubName { get; }

Property Value

string
subName

UserId

Unique id that matches a user or usergroup. custom unique userids are supported, but user of these values will have to ensure uniqueness with AccessUser table
public string UserId { get; }

Property Value

string
userId

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToIdentifier()

Yields the identifier this permission affects.
public UnifiedPermissionIdentifier ToIdentifier()

Returns

UnifiedPermissionIdentifier
identifier
To top