Search Results for

    Show / Hide Table of Contents
    View Source

    Class ElementPermissionResource

    A resource used for the ElementPermissionHandler.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Security.Authorization
    Assembly: Umbraco.Core.dll
    Syntax
    public class ElementPermissionResource : IPermissionResource

    Properties

    View Source

    CheckRecycleBin

    Gets a value indicating whether to check for the recycle bin.

    Declaration
    public bool CheckRecycleBin { get; }
    Property Value
    Type Description
    bool
    View Source

    CheckRoot

    Gets a value indicating whether to check for the root.

    Declaration
    public bool CheckRoot { get; }
    Property Value
    Type Description
    bool
    View Source

    CulturesToCheck

    All the cultures need to be accessible when evaluating

    Declaration
    public ISet<string>? CulturesToCheck { get; }
    Property Value
    Type Description
    ISet<string>
    View Source

    ElementKeys

    Gets the element keys.

    Declaration
    public IEnumerable<Guid> ElementKeys { get; }
    Property Value
    Type Description
    IEnumerable<Guid>
    View Source

    ParentKeyForBranch

    Gets the parent key of a branch.

    Declaration
    public Guid? ParentKeyForBranch { get; }
    Property Value
    Type Description
    Guid?
    View Source

    PermissionsToCheck

    Gets the collection of permissions to authorize.

    Declaration
    public ISet<string> PermissionsToCheck { get; }
    Property Value
    Type Description
    ISet<string>
    Remarks

    All permissions have to be satisfied when evaluating.

    Methods

    View Source

    Branch(ISet<string>, Guid)

    Creates a ElementPermissionResource with the specified permissions and the branch from the specified parent key.

    Declaration
    public static ElementPermissionResource Branch(ISet<string> permissionsToCheck, Guid parentKeyForBranch)
    Parameters
    Type Name Description
    ISet<string> permissionsToCheck

    The permissions to check for.

    Guid parentKeyForBranch

    The parent key of the branch.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Branch(string, Guid)

    Creates a ElementPermissionResource with the specified permission and the branch from the specified parent key.

    Declaration
    public static ElementPermissionResource Branch(string permissionToCheck, Guid parentKeyForBranch)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid parentKeyForBranch

    The parent key of the branch.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Branch(string, Guid, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permission and the branch from the specified parent key.

    Declaration
    public static ElementPermissionResource Branch(string permissionToCheck, Guid parentKeyForBranch, IEnumerable<string> culturesToCheck)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid parentKeyForBranch

    The parent key of the branch.

    IEnumerable<string> culturesToCheck

    The required cultures

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    RecycleBin(ISet<string>)

    Creates a ElementPermissionResource with the specified permissions and the recycle bin.

    Declaration
    public static ElementPermissionResource RecycleBin(ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    ISet<string> permissionsToCheck

    The permissions to check for.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    RecycleBin(string)

    Creates a ElementPermissionResource with the specified permission and the recycle bin.

    Declaration
    public static ElementPermissionResource RecycleBin(string permissionToCheck)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Root(ISet<string>)

    Creates a ElementPermissionResource with the specified permissions and the root.

    Declaration
    public static ElementPermissionResource Root(ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    ISet<string> permissionsToCheck

    The permissions to check for.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Root(ISet<string>, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permissions and the root.

    Declaration
    public static ElementPermissionResource Root(ISet<string> permissionsToCheck, IEnumerable<string> cultures)
    Parameters
    Type Name Description
    ISet<string> permissionsToCheck

    The permissions to check for.

    IEnumerable<string> cultures

    The cultures to validate

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Root(string)

    Creates a ElementPermissionResource with the specified permission and the root.

    Declaration
    public static ElementPermissionResource Root(string permissionToCheck)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    Root(string, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permission and the root.

    Declaration
    public static ElementPermissionResource Root(string permissionToCheck, IEnumerable<string> cultures)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    IEnumerable<string> cultures

    The cultures to validate

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(ISet<string>, IEnumerable<Guid>)

    Creates a ElementPermissionResource with the specified permissions and element keys.

    Declaration
    public static ElementPermissionResource WithKeys(ISet<string> permissionsToCheck, IEnumerable<Guid> elementKeys)
    Parameters
    Type Name Description
    ISet<string> permissionsToCheck

    The permissions to check for.

    IEnumerable<Guid> elementKeys

    The keys of the elements.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, IEnumerable<Guid>)

    Creates a ElementPermissionResource with the specified permission and element keys.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid> elementKeys)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    IEnumerable<Guid> elementKeys

    The keys of the elements.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, IEnumerable<Guid>, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permission and element keys.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid> elementKeys, IEnumerable<string> cultures)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    IEnumerable<Guid> elementKeys

    The keys of the elements.

    IEnumerable<string> cultures

    The required culture access

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, IEnumerable<Guid?>)

    Creates a ElementPermissionResource with the specified permission and element keys.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, IEnumerable<Guid?> elementKeys)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    IEnumerable<Guid?> elementKeys

    The keys of the elements or null if root.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, Guid)

    Creates a ElementPermissionResource with the specified permission and element key.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, Guid elementKey)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid elementKey

    The key of the element.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, Guid, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permission and element key.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, Guid elementKey, IEnumerable<string> cultures)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid elementKey

    The key of the element.

    IEnumerable<string> cultures

    The required culture access

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, Guid?)

    Creates a ElementPermissionResource with the specified permission and element key or root.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, Guid? elementKey)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid? elementKey

    The key of the element or null if root.

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    View Source

    WithKeys(string, Guid?, IEnumerable<string>)

    Creates a ElementPermissionResource with the specified permission and element key or root.

    Declaration
    public static ElementPermissionResource WithKeys(string permissionToCheck, Guid? elementKey, IEnumerable<string> cultures)
    Parameters
    Type Name Description
    string permissionToCheck

    The permission to check for.

    Guid? elementKey

    The key of the element or null if root.

    IEnumerable<string> cultures

    The cultures to validate

    Returns
    Type Description
    ElementPermissionResource

    An instance of ElementPermissionResource.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX