Search Results for

    Show / Hide Table of Contents
    View Source

    Class MemberIndexAuthorizer

    Inheritance
    object
    Namespace: Umbraco.Cms.Api.Management.Services
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    public class MemberIndexAuthorizer : IMemberIndexAuthorizer

    Constructors

    View Source

    MemberIndexAuthorizer(IExamineManager, IAuthorizationService)

    Initializes a new instance of the MemberIndexAuthorizer class.

    Declaration
    public MemberIndexAuthorizer(IExamineManager examineManager, IAuthorizationService authorizationService)
    Parameters
    Type Name Description
    IExamineManager examineManager

    The Examine.IExamineManager used to resolve indexes by name.

    IAuthorizationService authorizationService

    The Microsoft.AspNetCore.Authorization.IAuthorizationService used to evaluate section access.

    Methods

    View Source

    HasAccessAsync(ClaimsPrincipal)

    Gets a value indicating whether the supplied principal may access member data.

    Declaration
    public Task<bool> HasAccessAsync(ClaimsPrincipal principal)
    Parameters
    Type Name Description
    ClaimsPrincipal principal

    The principal to authorize.

    Returns
    Type Description
    Task<bool>

    true if the principal may access member data; otherwise, false.

    View Source

    IsMemberIndex(IIndex)

    Gets a value indicating whether the supplied index holds member data.

    Declaration
    public bool IsMemberIndex(IIndex index)
    Parameters
    Type Name Description
    IIndex index

    The index to check.

    Returns
    Type Description
    bool

    true if the index holds member data; otherwise, false.

    View Source

    IsMemberIndex(string)

    Gets a value indicating whether the supplied name identifies an index holding member data.

    Declaration
    public bool IsMemberIndex(string indexOrSearcherName)
    Parameters
    Type Name Description
    string indexOrSearcherName

    The name of the index, or of the index's searcher, to check.

    Returns
    Type Description
    bool

    true if a matching index exists and holds member data; otherwise, false.

    Remarks

    Both names are matched because a searcher can be resolved either by its index name or by its own name - see TryFindSearcher(string, out ISearcher). A searcher registered on its own, without a backing index, cannot be classified and is therefore treated as not holding member data.

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