Interface IMediaPermissionAuthorizer
Authorizes media access.
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public interface IMediaPermissionAuthorizer
Methods
View SourceIsDeniedAsync(IUser, Guid)
Authorizes whether the current user has access to the specified media item.
Declaration
virtual Task<bool> IsDeniedAsync(IUser currentUser, Guid mediaKey)
Parameters
Type | Name | Description |
---|---|---|
IUser | currentUser | The current user. |
Guid | mediaKey | The key of the media item to check for. |
Returns
Type | Description |
---|---|
Task<System. |
Returns |
IsDeniedAsync(IUser, IEnumerable<Guid>)
Authorizes whether the current user has access to the specified media item(s).
Declaration
Task<bool> IsDeniedAsync(IUser currentUser, IEnumerable<Guid> mediaKeys)
Parameters
Type | Name | Description |
---|---|---|
IUser | currentUser | The current user. |
IEnumerable<Guid> | mediaKeys | The keys of the media items to check for. |
Returns
Type | Description |
---|---|
Task<System. |
Returns |
IsDeniedAtRecycleBinLevelAsync(IUser)
Authorizes whether the current user has access to the recycle bin item.
Declaration
Task<bool> IsDeniedAtRecycleBinLevelAsync(IUser currentUser)
Parameters
Type | Name | Description |
---|---|---|
IUser | currentUser | The current user. |
Returns
Type | Description |
---|---|
Task<System. |
Returns |
IsDeniedAtRootLevelAsync(IUser)
Authorizes whether the current user has access to the root item.
Declaration
Task<bool> IsDeniedAtRootLevelAsync(IUser currentUser)
Parameters
Type | Name | Description |
---|---|---|
IUser | currentUser | The current user. |
Returns
Type | Description |
---|---|
Task<System. |
Returns |