Interface IContentPermissionAuthorizer
Authorizes content access.
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public interface IContentPermissionAuthorizer
Methods
View SourceIsAuthorizedAtRootLevelAsync(IUser, string)
Authorizes whether the current user has access to the root item.
Declaration
Task<bool> IsAuthorizedAtRootLevelAsync(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 |
IsDeniedAsync(IUser, IEnumerable<Guid>, ISet<string>)
Authorizes whether the current user has access to the specified content item(s).
Declaration
Task<bool> IsDeniedAsync(IUser currentUser, IEnumerable<Guid> contentKeys, ISet<string> permissionsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| IEnumerable<Guid> | contentKeys | The keys of the content 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 content item.
Declaration
Task<bool> IsDeniedAsync(IUser currentUser, Guid contentKey, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| Guid | contentKey | The key of the content 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 |
IsDeniedForCultures(IUser, ISet<string>)
Declaration
Task<bool> IsDeniedForCultures(IUser currentUser, ISet<string> culturesToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | |
| ISet<string> | culturesToCheck |
Returns
| Type | Description |
|---|---|
| Task<bool> |
IsDeniedWithDescendantsAsync(IUser, Guid, ISet<string>)
Authorizes whether the current user has access to the descendants of the specified content 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 content 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 content 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 content item. |
| string | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<bool> | Returns |