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
virtual Task<bool> IsAuthorizedAtRootLevelAsync(IUser currentUser, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user. |
| System.String | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | Returns |
IsDeniedAsync(IUser, Guid, String)
Authorizes whether the current user has access to the specified content item.
Declaration
virtual 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. |
| System.String | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | 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<System.String> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | 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<System.String> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | Returns |
IsDeniedAtRecycleBinLevelAsync(IUser, String)
Authorizes whether the current user has access to the recycle bin item.
Declaration
virtual Task<bool> IsDeniedAtRecycleBinLevelAsync(IUser currentUser, string permissionToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | The current user'. |
| System.String | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | 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<System.String> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | Returns |
IsDeniedForCultures(IUser, ISet<String>)
Declaration
Task<bool> IsDeniedForCultures(IUser currentUser, ISet<string> culturesToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | currentUser | |
| ISet<System.String> | culturesToCheck |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> |
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<System.String> | permissionsToCheck | The collection of permissions to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | Returns |
IsDeniedWithDescendantsAsync(IUser, Guid, String)
Authorizes whether the current user has access to the descendants of the specified content item.
Declaration
virtual 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. |
| System.String | permissionToCheck | The permission to authorize. |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | Returns |