Interface IElementPermissionAuthorizer
Authorizes element access.
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public interface IElementPermissionAuthorizer
Methods
View SourceIsDeniedAsync(IUser, IEnumerable<Guid>, ISet<string>)
Authorizes whether the current user has access to the specified element item(s).
Declaration
Task<bool> IsDeniedAsync(IUser currentUser, IEnumerable<Guid> elementKeys, ISet<string> permissionsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| IEnumerable<Guid> | elementKeys | The keys of the element items to check for. |
| ISet<string> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedAsync(IUser, Guid, string)
Authorizes whether the current user has access to the specified element item.
Declaration
Task<bool> IsDeniedAsync(IUser currentUser, Guid elementKey, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| Guid | elementKey | The key of the element item to check for. |
| string | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedAtRecycleBinLevelAsync(IUser, ISet<string>)
Authorizes whether the current user has access to the recycle bin item.
Declaration
Task<bool> IsDeniedAtRecycleBinLevelAsync(IUser currentUser, ISet<string> permissionsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| ISet<string> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedAtRecycleBinLevelAsync(IUser, string)
Authorizes whether the current user has access to the recycle bin item.
Declaration
Task<bool> IsDeniedAtRecycleBinLevelAsync(IUser currentUser, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| string | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedAtRootLevelAsync(IUser, ISet<string>)
Authorizes whether the current user has access to the root item.
Declaration
Task<bool> IsDeniedAtRootLevelAsync(IUser currentUser, ISet<string> permissionsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| ISet<string> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedAtRootLevelAsync(IUser, string)
Authorizes whether the current user has access to the root item.
Declaration
Task<bool> IsDeniedAtRootLevelAsync(IUser currentUser, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| string | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedForCultures(IUser, ISet<string>)
Authorizes whether the current user has access to the specified cultures.
Declaration
Task<bool> IsDeniedForCultures(IUser currentUser, ISet<string> culturesToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| ISet<string> | culturesToCheck | The cultures to check for access. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedWithDescendantsAsync(IUser, Guid, ISet<string>)
Authorizes whether the current user has access to the descendants of the specified element item.
Declaration
Task<bool> IsDeniedWithDescendantsAsync(IUser currentUser, Guid parentKey, ISet<string> permissionsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| Guid | parentKey | The key of the parent element item. |
| ISet<string> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |
IsDeniedWithDescendantsAsync(IUser, Guid, string)
Authorizes whether the current user has access to the descendants of the specified element item.
Declaration
Task<bool> IsDeniedWithDescendantsAsync(IUser currentUser, Guid parentKey, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| Guid | parentKey | The key of the parent element item. |
| string | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |