Class ContentPermissionResource
A resource used for the
Inheritance
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public class ContentPermissionResource : IPermissionResource
Properties
View SourceCheckRecycleBin
Gets a value indicating whether to check for the recycle bin.
Declaration
public bool CheckRecycleBin { get; }
Property Value
Type | Description |
---|---|
System. |
CheckRoot
Gets a value indicating whether to check for the root.
Declaration
public bool CheckRoot { get; }
Property Value
Type | Description |
---|---|
System. |
ContentKeys
Gets the content keys.
Declaration
public IEnumerable<Guid> ContentKeys { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Guid> |
CulturesToCheck
All the cultures need to be accessible when evaluating
Declaration
public ISet<string>? CulturesToCheck { get; }
Property Value
Type | Description |
---|---|
System. |
ParentKeyForBranch
Gets the parent key of a branch.
Declaration
public Guid? ParentKeyForBranch { get; }
Property Value
Type | Description |
---|---|
System. |
PermissionsToCheck
Gets the collection of permissions to authorize.
Declaration
public ISet<string> PermissionsToCheck { get; }
Property Value
Type | Description |
---|---|
ISet<System. |
Remarks
All permissions have to be satisfied when evaluating.
Methods
View SourceBranch(ISet<String>, Guid)
Creates a Content
Declaration
public static ContentPermissionResource Branch(ISet<string> permissionsToCheck, Guid parentKeyForBranch)
Parameters
Type | Name | Description |
---|---|---|
ISet<System. |
permissionsToCheck | The permissions to check for. |
Guid | parentKeyForBranch | The parent key of the branch. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Branch(String, Guid)
Creates a Content
Declaration
public static ContentPermissionResource Branch(string permissionToCheck, Guid parentKeyForBranch)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Guid | parentKeyForBranch | The parent key of the branch. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Branch(String, Guid, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource Branch(string permissionToCheck, Guid parentKeyForBranch, IEnumerable<string> culturesToCheck)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Guid | parentKeyForBranch | The parent key of the branch. |
IEnumerable<System. |
culturesToCheck | The required cultures |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
RecycleBin(ISet<String>)
Creates a Content
Declaration
public static ContentPermissionResource RecycleBin(ISet<string> permissionsToCheck)
Parameters
Type | Name | Description |
---|---|---|
ISet<System. |
permissionsToCheck | The permissions to check for. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
RecycleBin(String)
Creates a Content
Declaration
public static ContentPermissionResource RecycleBin(string permissionToCheck)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Root(ISet<String>)
Creates a Content
Declaration
public static ContentPermissionResource Root(ISet<string> permissionsToCheck)
Parameters
Type | Name | Description |
---|---|---|
ISet<System. |
permissionsToCheck | The permissions to check for. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Root(ISet<String>, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource Root(ISet<string> permissionsToCheck, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
ISet<System. |
permissionsToCheck | The permissions to check for. |
IEnumerable<System. |
cultures | The cultures to validate |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Root(String)
Creates a Content
Declaration
public static ContentPermissionResource Root(string permissionToCheck)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
Root(String, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource Root(string permissionToCheck, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
IEnumerable<System. |
cultures | The cultures to validate |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(ISet<String>, IEnumerable<Guid>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(ISet<string> permissionsToCheck, IEnumerable<Guid> contentKeys)
Parameters
Type | Name | Description |
---|---|---|
ISet<System. |
permissionsToCheck | The permissions to check for. |
IEnumerable<Guid> | contentKeys | The keys of the contents. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, Guid)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, Guid contentKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Guid | contentKey | The key of the content. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, Guid, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, Guid contentKey, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
Guid | contentKey | The key of the content. |
IEnumerable<System. |
cultures | The required culture access |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, IEnumerable<Guid>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid> contentKeys)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
IEnumerable<Guid> | contentKeys | The keys of the contents. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, IEnumerable<Guid>, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid> contentKeys, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
IEnumerable<Guid> | contentKeys | The keys of the contents. |
IEnumerable<System. |
cultures | The required culture access |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, IEnumerable<Nullable<Guid>>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid?> contentKeys)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
IEnumerable<System. |
contentKeys | The keys of the contents or null if root. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, Nullable<Guid>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, Guid? contentKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
System. |
contentKey | The key of the content or null if root. |
Returns
Type | Description |
---|---|
Content |
An instance of Content |
WithKeys(String, Nullable<Guid>, IEnumerable<String>)
Creates a Content
Declaration
public static ContentPermissionResource WithKeys(string permissionToCheck, Guid? contentKey, IEnumerable<string> cultures)
Parameters
Type | Name | Description |
---|---|---|
System. |
permissionToCheck | The permission to check for. |
System. |
contentKey | The key of the content or null if root. |
IEnumerable<System. |
cultures | The cultures to validate |
Returns
Type | Description |
---|---|
Content |
An instance of Content |