Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublicAccessServiceExtensions

    Extension methods for the IPublicAccessService

    Inheritance
    System.Object
    Namespace: Umbraco.Core.Services
    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
    System.Collections.Generic.IEnumerable<System.String> currentMemberRoles
    Returns
    Type Description
    System.Boolean
    View Source

    HasAccess(IPublicAccessService, String, String, Func<String, 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 bool HasAccess(this IPublicAccessService publicAccessService, string path, string username, Func<string, IEnumerable<string>> rolesCallback)
    Parameters
    Type Name Description
    IPublicAccessService publicAccessService
    System.String path
    System.String username
    System.Func<System.String, System.Collections.Generic.IEnumerable<System.String>> rolesCallback

    A callback to retrieve the roles for this member

    Returns
    Type Description
    System.Boolean
    View Source

    HasAccess(IPublicAccessService, String, MembershipUser, RoleProvider)

    Declaration
    public static bool HasAccess(this IPublicAccessService publicAccessService, string path, MembershipUser member, RoleProvider roleProvider)
    Parameters
    Type Name Description
    IPublicAccessService publicAccessService
    System.String path
    System.Web.Security.MembershipUser member
    System.Web.Security.RoleProvider roleProvider
    Returns
    Type Description
    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>)
      • HasAccess(IPublicAccessService, String, String, Func<String, IEnumerable<String>>)
      • HasAccess(IPublicAccessService, String, MembershipUser, RoleProvider)
      • RenameMemberGroupRoleRules(IPublicAccessService, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX