Interface IMediaPermissionService
Manages permissions for media access.
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IMediaPermissionService
Methods
View SourceAuthorizeAccessAsync(IUser, Guid)
Authorize that a user has access to a media item.
Declaration
virtual Task<MediaAuthorizationStatus> AuthorizeAccessAsync(IUser user, Guid mediaKey)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
Guid | mediaKey | The identifier of the media item to check for access. |
Returns
Type | Description |
---|---|
Task<MediaAuthorizationStatus> | A task resolving into a MediaAuthorizationStatus. |
AuthorizeAccessAsync(IUser, IEnumerable<Guid>)
Authorize that a user has access to media items.
Declaration
Task<MediaAuthorizationStatus> AuthorizeAccessAsync(IUser user, IEnumerable<Guid> mediaKeys)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
IEnumerable<Guid> | mediaKeys | The identifiers of the media items to check for access. |
Returns
Type | Description |
---|---|
Task<MediaAuthorizationStatus> | A task resolving into a MediaAuthorizationStatus. |
AuthorizeBinAccessAsync(IUser)
Authorize that a user has access to the media bin item.
Declaration
Task<MediaAuthorizationStatus> AuthorizeBinAccessAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
Returns
Type | Description |
---|---|
Task<MediaAuthorizationStatus> | A task resolving into a MediaAuthorizationStatus. |
AuthorizeRootAccessAsync(IUser)
Authorize that a user has access to the media root item.
Declaration
Task<MediaAuthorizationStatus> AuthorizeRootAccessAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
Returns
Type | Description |
---|---|
Task<MediaAuthorizationStatus> | A task resolving into a MediaAuthorizationStatus. |