Table of Contents

Class Permission

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

Represents a configured permission for a permission owner (user group or role).

public sealed class Permission : IEquatable<Permission>
Inheritance
Permission
Implements
Inherited Members

Remarks

Immutable

Constructors

Permission(string, PermissionEntityIdentifier, PermissionLevel)

Instantiates a permission level for an owner (group or role) on an entity identifier.

public Permission(string ownerId, PermissionEntityIdentifier identifier, PermissionLevel level)

Parameters

ownerId string

Owner identifier

identifier PermissionEntityIdentifier

Entity identifier

level PermissionLevel

permission level

Permission(string, string, string, string, PermissionLevel)

Instantiates a permission level for am owner (group or role) on an identifier.

public Permission(string ownerId, string key, string name, string subName, PermissionLevel level)

Parameters

ownerId string

Owner identifier

key string

key

name string

name

subName string

subName

level PermissionLevel

permission level

Properties

Identifier

Gets the identifier of the entity that is affected by this permission.

public PermissionEntityIdentifier Identifier { get; }

Property Value

PermissionEntityIdentifier

Key

Gets the key of the entity that is affected by this permission, e.g. "123" for a given page id.

public string Key { get; }

Property Value

string

Level

Gets the level of permission.

public PermissionLevel Level { get; }

Property Value

PermissionLevel

Name

Gets the name (type/class) of the entity that is affected by this permission, e.g "Page", "Paragraph", "Item" etc.

public string Name { get; }

Property Value

string

OwnerId

Gets the identifier that matches a user, user group or role.

public string OwnerId { get; }

Property Value

string

SubName

Gets the subname (subtype/subclass) that is affected by this permission.

public string SubName { get; }

Property Value

string

Methods

Equals(Permission?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Permission? other)

Parameters

other Permission

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

To top