Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IMemberManager

    The user manager for members

    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public interface IMemberManager : IUmbracoUserManager<MemberIdentityUser>

    Methods

    View Source

    AsPublishedMember(MemberIdentityUser)

    Returns the IPublishedContent instance for the specified MemberIdentityUser

    Declaration
    IPublishedContent AsPublishedMember(MemberIdentityUser user)
    Parameters
    Type Name Description
    MemberIdentityUser user
    Returns
    Type Description
    IPublishedContent
    View Source

    GetCurrentMemberAsync()

    Returns the currently logged in member if there is one, else returns null

    Declaration
    Task<MemberIdentityUser> GetCurrentMemberAsync()
    Returns
    Type Description
    Task<MemberIdentityUser>
    View Source

    IsLoggedIn()

    Check if a member is logged in

    Declaration
    bool IsLoggedIn()
    Returns
    Type Description
    System.Boolean
    View Source

    IsMemberAuthorizedAsync(Nullable<IEnumerable<String>>, Nullable<IEnumerable<String>>, Nullable<IEnumerable<Int32>>)

    Checks if the current member is authorized based on the parameters provided.

    Declaration
    Task<bool> IsMemberAuthorizedAsync(IEnumerable<string>? allowTypes = null, IEnumerable<string>? allowGroups = null, IEnumerable<int>? allowMembers = null)
    Parameters
    Type Name Description
    System.Nullable<IEnumerable<System.String>> allowTypes

    Allowed types.

    System.Nullable<IEnumerable<System.String>> allowGroups

    Allowed groups.

    System.Nullable<IEnumerable<System.Int32>> allowMembers

    Allowed individual members.

    Returns
    Type Description
    Task<System.Boolean>

    True or false if the currently logged in member is authorized

    View Source

    IsProtectedAsync(IEnumerable<String>)

    Declaration
    Task<IReadOnlyDictionary<string, bool>> IsProtectedAsync(IEnumerable<string> paths)
    Parameters
    Type Name Description
    IEnumerable<System.String> paths
    Returns
    Type Description
    Task<IReadOnlyDictionary<System.String, System.Boolean>>
    View Source

    IsProtectedAsync(String)

    Check if a document object is protected by the "Protect Pages" functionality in umbraco

    Declaration
    Task<bool> IsProtectedAsync(string path)
    Parameters
    Type Name Description
    System.String path

    The full path of the document object to check

    Returns
    Type Description
    Task<System.Boolean>

    True if the document object is protected

    View Source

    MemberHasAccessAsync(IEnumerable<String>)

    Checks if the current user has access to the paths

    Declaration
    Task<IReadOnlyDictionary<string, bool>> MemberHasAccessAsync(IEnumerable<string> paths)
    Parameters
    Type Name Description
    IEnumerable<System.String> paths
    Returns
    Type Description
    Task<IReadOnlyDictionary<System.String, System.Boolean>>
    View Source

    MemberHasAccessAsync(String)

    Check if the current user has access to a document

    Declaration
    Task<bool> MemberHasAccessAsync(string path)
    Parameters
    Type Name Description
    System.String path

    The full path of the document object to check

    Returns
    Type Description
    Task<System.Boolean>

    True if the current user has access or if the current document isn't protected

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • AsPublishedMember(MemberIdentityUser)
      • GetCurrentMemberAsync()
      • IsLoggedIn()
      • IsMemberAuthorizedAsync(Nullable<IEnumerable<String>>, Nullable<IEnumerable<String>>, Nullable<IEnumerable<Int32>>)
      • IsProtectedAsync(IEnumerable<String>)
      • IsProtectedAsync(String)
      • MemberHasAccessAsync(IEnumerable<String>)
      • MemberHasAccessAsync(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX