Search Results for

    Show / Hide Table of Contents
    View Source

    Class SectionHandler

    Ensures that the current user has access to the section

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

    The user only needs access to one of the sections specified, not all of the sections.

    Constructors

    View Source

    SectionHandler(IBackOfficeSecurityAccessor)

    Initializes a new instance of the SectionHandler class.

    Declaration
    public SectionHandler(IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
    Parameters
    Type Name Description
    IBackOfficeSecurityAccessor backOfficeSecurityAccessor

    Accessor for back-office security.

    Methods

    View Source

    IsAuthorized(AuthorizationHandlerContext, SectionRequirement)

    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, SectionRequirement requirement)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context

    The authorization context.

    SectionRequirement requirement
    Returns
    Type Description
    Task<System.Boolean>

    True if request is authorized, false if not.

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