Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublicAccessServiceExtensions

    Extension methods for the IPublicAccessService

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class PublicAccessServiceExtensions

    Methods

    View Source

    HasAccess(IPublicAccessService, Int32, IContentService, String, IEnumerable<String>)

    Declaration
    public static bool HasAccess(this IPublicAccessService publicAccessService, int documentId, IContentService contentService, string username, IEnumerable<string> currentMemberRoles)
    Parameters
    Type Name Description
    IPublicAccessService publicAccessService
    System.Int32 documentId
    IContentService contentService
    System.String username
    IEnumerable<System.String> currentMemberRoles
    Returns
    Type Description
    System.Boolean
    View Source

    HasAccessAsync(IPublicAccessService, String, String, Func<Task<IEnumerable<String>>>)

    Checks if the member with the specified username has access to the path which is also based on the passed in roles for the member

    Declaration
    public static async Task<bool> HasAccessAsync(this IPublicAccessService publicAccessService, string path, string username, Func<Task<IEnumerable<string>>> rolesCallback)
    Parameters
    Type Name Description
    IPublicAccessService publicAccessService
    System.String path
    System.String username
    Func<Task<IEnumerable<System.String>>> rolesCallback

    A callback to retrieve the roles for this member

    Returns
    Type Description
    Task<System.Boolean>
    View Source

    RenameMemberGroupRoleRules(IPublicAccessService, String, String)

    Declaration
    public static bool RenameMemberGroupRoleRules(this IPublicAccessService publicAccessService, string oldRolename, string newRolename)
    Parameters
    Type Name Description
    IPublicAccessService publicAccessService
    System.String oldRolename
    System.String newRolename
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • HasAccess(IPublicAccessService, Int32, IContentService, String, IEnumerable<String>)
      • HasAccessAsync(IPublicAccessService, String, String, Func<Task<IEnumerable<String>>>)
      • RenameMemberGroupRoleRules(IPublicAccessService, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX