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
stringOwner identifier
identifier
PermissionEntityIdentifierEntity identifier
level
PermissionLevelpermission 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
stringOwner identifier
key
stringkey
name
stringname
subName
stringsubName
level
PermissionLevelpermission level
Properties
Identifier
Gets the identifier of the entity that is affected by this permission.
public PermissionEntityIdentifier Identifier { get; }
Property Value
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
Level
Gets the level of permission.
public PermissionLevel Level { get; }
Property Value
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
OwnerId
Gets the identifier that matches a user, user group or role.
public string OwnerId { get; }
Property Value
SubName
Gets the subname (subtype/subclass) that is affected by this permission.
public string SubName { get; }
Property Value
Methods
Equals(Permission?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Permission? other)
Parameters
other
PermissionAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.