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>)
Declaration
public EntityPermission(int groupId, int entityId, ISet<string> assignedPermissions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | |
| int | entityId | |
| ISet<string> | assignedPermissions |
EntityPermission(int, int, ISet<string>, bool)
Declaration
public EntityPermission(int groupId, int entityId, ISet<string> assignedPermissions, bool isDefaultPermissions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | |
| int | entityId | |
| ISet<string> | assignedPermissions | |
| bool | isDefaultPermissions |
Properties
View SourceAssignedPermissions
The assigned permissions for the user/entity combo
Declaration
public ISet<string> AssignedPermissions { get; }
Property Value
| Type | Description |
|---|---|
| ISet<string> |
EntityId
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
Declaration
public int UserGroupId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceEquals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
Equals(EntityPermission?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(EntityPermission? other)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityPermission | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |