Class MediaPermissionResource
A resource used for the
Inheritance
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public class MediaPermissionResource : IPermissionResource
Properties
View SourceCheckRecycleBin
Gets a value indicating whether to check the recycle bin.
Declaration
public bool CheckRecycleBin { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CheckRoot
Gets a value indicating whether to check the root.
Declaration
public bool CheckRoot { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MediaKeys
Gets the media keys.
Declaration
public IEnumerable<Guid> MediaKeys { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Guid> |
Methods
View SourceRecycleBin()
Creates a MediaPermissionResource with the recycle bin.
Declaration
public static MediaPermissionResource RecycleBin()
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |
Root()
Creates a MediaPermissionResource with the root.
Declaration
public static MediaPermissionResource Root()
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |
WithKeys(Guid)
Creates a MediaPermissionResource with the specified key.
Declaration
public static MediaPermissionResource WithKeys(Guid mediaKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | mediaKey | The key of the media. |
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |
WithKeys(IEnumerable<Guid>)
Creates a MediaPermissionResource with the specified keys.
Declaration
public static MediaPermissionResource WithKeys(IEnumerable<Guid> mediaKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Guid> | mediaKeys | The keys of the medias. |
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |
WithKeys(IEnumerable<Nullable<Guid>>)
Creates a MediaPermissionResource with the specified keys.
Declaration
public static MediaPermissionResource WithKeys(IEnumerable<Guid?> mediaKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<System.Nullable<Guid>> | mediaKeys | The keys of the medias or null if root. |
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |
WithKeys(Nullable<Guid>)
Creates a MediaPermissionResource with the specified key.
Declaration
public static MediaPermissionResource WithKeys(Guid? mediaKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Guid> | mediaKey | The key of the media or null if root. |
Returns
| Type | Description |
|---|---|
| MediaPermissionResource | An instance of MediaPermissionResource. |