Class ElementContainerPermissionResource
A resource used for the ElementContainerPermissionHandler.
Inheritance
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public class ElementContainerPermissionResource : IPermissionResource
Properties
View SourceCheckRecycleBin
Gets a value indicating whether to check for the recycle bin.
Declaration
public bool CheckRecycleBin { get; }
Property Value
| Type | Description |
|---|---|
| bool |
CheckRoot
Gets a value indicating whether to check for the root.
Declaration
public bool CheckRoot { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ContainerKeys
Gets the container keys.
Declaration
public IEnumerable<Guid> ContainerKeys { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Guid> |
PermissionsToCheck
Gets the collection of permissions to authorize.
Declaration
public ISet<string> PermissionsToCheck { get; }
Property Value
| Type | Description |
|---|---|
| ISet<string> |
Remarks
All permissions have to be satisfied when evaluating.
Methods
View SourceRecycleBin(string)
Creates a ElementContainerPermissionResource with the specified permission and the recycle bin.
Declaration
public static ElementContainerPermissionResource RecycleBin(string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| string | permissionToCheck | The permission to check for. |
Returns
| Type | Description |
|---|---|
| ElementContainerPermissionResource | An instance of ElementContainerPermissionResource. |
Root(string)
Creates a ElementContainerPermissionResource with the specified permission and the root.
Declaration
public static ElementContainerPermissionResource Root(string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| string | permissionToCheck | The permission to check for. |
Returns
| Type | Description |
|---|---|
| ElementContainerPermissionResource | An instance of ElementContainerPermissionResource. |
WithKeys(string, IEnumerable<Guid>)
Creates a ElementContainerPermissionResource with the specified permission and container keys.
Declaration
public static ElementContainerPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid> containerKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| string | permissionToCheck | The permission to check for. |
| IEnumerable<Guid> | containerKeys | The keys of the containers. |
Returns
| Type | Description |
|---|---|
| ElementContainerPermissionResource | An instance of ElementContainerPermissionResource. |
WithKeys(string, Guid)
Creates a ElementContainerPermissionResource with the specified permission and container key.
Declaration
public static ElementContainerPermissionResource WithKeys(string permissionToCheck, Guid containerKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | permissionToCheck | The permission to check for. |
| Guid | containerKey | The key of the container. |
Returns
| Type | Description |
|---|---|
| ElementContainerPermissionResource | An instance of ElementContainerPermissionResource. |
WithKeys(string, Guid?)
Creates a ElementContainerPermissionResource with the specified permission and container key or root.
Declaration
public static ElementContainerPermissionResource WithKeys(string permissionToCheck, Guid? containerKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | permissionToCheck | The permission to check for. |
| Guid? | containerKey | The key of the container or null if root. |
Returns
| Type | Description |
|---|---|
| ElementContainerPermissionResource | An instance of ElementContainerPermissionResource. |