• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Class UserGroupHandler

    Authorizes that the current user has access to the user group Id in the request

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

    Constructors

    View Source

    UserGroupHandler(IHttpContextAccessor, IUserService, IContentService, IMediaService, IEntityService, IBackOfficeSecurityAccessor, AppCaches)

    Initializes a new instance of the UserGroupHandler class.

    Declaration
    public UserGroupHandler(IHttpContextAccessor httpContextAccessor, IUserService userService, IContentService contentService, IMediaService mediaService, IEntityService entityService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, AppCaches appCaches)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor

    Accessor for the HTTP context of the current request.

    IUserService userService

    Service for user related operations.

    IContentService contentService

    Service for content related operations.

    IMediaService mediaService

    Service for media related operations.

    IEntityService entityService

    Service for entity related operations.

    IBackOfficeSecurityAccessor backOfficeSecurityAccessor

    Accessor for back-office security.

    AppCaches appCaches

    Methods

    View Source

    IsAuthorized(AuthorizationHandlerContext, UserGroupRequirement)

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

    The authorization context.

    UserGroupRequirement requirement
    Returns
    Type Description
    Task<System.Boolean>

    True if request is authorized, false if not.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UserGroupHandler(IHttpContextAccessor, IUserService, IContentService, IMediaService, IEntityService, IBackOfficeSecurityAccessor, AppCaches)
    • Methods
      • IsAuthorized(AuthorizationHandlerContext, UserGroupRequirement)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX