Search Results for

    Show / Hide Table of Contents
    View Source

    Class TreeHandler

    Ensures that the current user has access to the section for which the specified tree(s) belongs

    Inheritance
    System.Object
    Microsoft.AspNetCore.Authorization.AuthorizationHandler<TreeRequirement>
    MustSatisfyRequirementAuthorizationHandler<TreeRequirement>
    Namespace: Umbraco.Cms.Web.BackOffice.Authorization
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    public class TreeHandler : MustSatisfyRequirementAuthorizationHandler<TreeRequirement>, IAuthorizationHandler
    Remarks

    This would allow a tree to be moved between sections. The user only needs access to one of the trees specified, not all of the trees.

    Constructors

    View Source

    TreeHandler(ITreeService, IBackOfficeSecurityAccessor)

    Initializes a new instance of the TreeHandler class.

    Declaration
    public TreeHandler(ITreeService treeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
    Parameters
    Type Name Description
    ITreeService treeService

    Service for section tree operations.

    IBackOfficeSecurityAccessor backOfficeSecurityAccessor

    Accessor for back-office security.

    Methods

    View Source

    IsAuthorized(AuthorizationHandlerContext, TreeRequirement)

    Return true if the requirement is succeeded or ignored, return false if the requirement is explicitly not met

    Declaration
    protected override Task<bool> IsAuthorized(AuthorizationHandlerContext context, TreeRequirement requirement)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context

    The authorization context.

    TreeRequirement requirement
    Returns
    Type Description
    Task<System.Boolean>

    True if request is authorized, false if not.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TreeHandler(ITreeService, IBackOfficeSecurityAccessor)
    • Methods
      • IsAuthorized(AuthorizationHandlerContext, TreeRequirement)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX