Class EntityPermission
Represents an entity permission (defined on the user group and derived to retrieve permissions for a given user)
Inheritance
Namespace: Umbraco.Cms.Core.Models.Membership
Assembly: Umbraco.Core.dll
Syntax
public class EntityPermission
Constructors
View SourceEntityPermission(int, int, ISet<string>)
Initializes a new instance of the EntityPermission class.
Declaration
public EntityPermission(int groupId, int entityId, ISet<string> assignedPermissions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | The user group identifier. |
| int | entityId | The entity identifier. |
| ISet<string> | assignedPermissions | The set of assigned permissions. |
EntityPermission(int, int, ISet<string>, bool)
Initializes a new instance of the EntityPermission class.
Declaration
public EntityPermission(int groupId, int entityId, ISet<string> assignedPermissions, bool isDefaultPermissions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | The user group identifier. |
| int | entityId | The entity identifier. |
| ISet<string> | assignedPermissions | The set of assigned permissions. |
| bool | isDefaultPermissions | Indicates whether these are default permissions. |
Properties
View SourceAssignedPermissions
The assigned permissions for the user/entity combo
Declaration
public ISet<string> AssignedPermissions { get; }
Property Value
| Type | Description |
|---|---|
| ISet<string> |
EntityId
Gets the entity identifier.
Declaration
public int EntityId { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsDefaultPermissions
True if the permissions assigned to this object are the group's default permissions and not explicitly defined permissions
Declaration
public bool IsDefaultPermissions { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
This will be the case when looking up entity permissions and falling back to the default permissions
UserGroupId
Gets the user group identifier.
Declaration
public int UserGroupId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(EntityPermission?)
Declaration
public bool Equals(EntityPermission? other)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityPermission | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |