Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentPermissions

    Checks user access to content

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Core.dll
    Syntax
    public class ContentPermissions

    Constructors

    View Source

    ContentPermissions(IUserService, IContentService, IEntityService, AppCaches)

    Declaration
    public ContentPermissions(IUserService userService, IContentService contentService, IEntityService entityService, AppCaches appCaches)
    Parameters
    Type Name Description
    IUserService userService
    IContentService contentService
    IEntityService entityService
    AppCaches appCaches

    Methods

    View Source

    CheckPermissions(int, IUser, out IUmbracoEntity?, IReadOnlySet<string>?)

    Checks if the user has access to the specified node and permissions set

    Declaration
    [Obsolete("Please use IContentPermissionService instead, scheduled for removal in V15.")]
    public ContentPermissions.ContentAccess CheckPermissions(int nodeId, IUser user, out IUmbracoEntity? entity, IReadOnlySet<string>? permissionsToCheck = null)
    Parameters
    Type Name Description
    int nodeId
    IUser user
    IUmbracoEntity entity

    The IUmbracoEntity item resolved if one was found for the id

    IReadOnlySet<string> permissionsToCheck
    Returns
    Type Description
    ContentPermissions.ContentAccess
    View Source

    CheckPermissions(int, IUser?, out IContent?, IReadOnlySet<string>?)

    Checks if the user has access to the specified node and permissions set

    Declaration
    [Obsolete("Please use IContentPermissionService instead, scheduled for removal in V15.")]
    public ContentPermissions.ContentAccess CheckPermissions(int nodeId, IUser? user, out IContent? contentItem, IReadOnlySet<string>? permissionsToCheck = null)
    Parameters
    Type Name Description
    int nodeId
    IUser user
    IContent contentItem

    The IContent item resolved if one was found for the id

    IReadOnlySet<string> permissionsToCheck
    Returns
    Type Description
    ContentPermissions.ContentAccess
    View Source

    HasPathAccess(string?, int[]?, int)

    Declaration
    public static bool HasPathAccess(string? path, int[]? startNodeIds, int recycleBinId)
    Parameters
    Type Name Description
    string path
    int[] startNodeIds
    int recycleBinId
    Returns
    Type Description
    bool
    View Source

    IsInBranchOfStartNode(string, int[]?, string[]?, out bool)

    Declaration
    public static bool IsInBranchOfStartNode(string path, int[]? startNodeIds, string[]? startNodePaths, out bool hasPathAccess)
    Parameters
    Type Name Description
    string path
    int[] startNodeIds
    string[] startNodePaths
    bool hasPathAccess
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX