Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentPermissionService

    Manages permissions for content access.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContentPermissionService

    Methods

    View Source

    AuthorizeAccessAsync(IUser, Guid, String)

    Authorize that a user has access to a content item.

    Declaration
    virtual Task<ContentAuthorizationStatus> AuthorizeAccessAsync(IUser user, Guid contentKey, string permissionToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    Guid contentKey

    The identifier of the content item to check for access.

    System.String permissionToCheck

    The permission to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeAccessAsync(IUser, IEnumerable<Guid>, ISet<String>)

    Authorize that a user has access to content items.

    Declaration
    Task<ContentAuthorizationStatus> AuthorizeAccessAsync(IUser user, IEnumerable<Guid> contentKeys, ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    IEnumerable<Guid> contentKeys

    The identifiers of the content items to check for access.

    ISet<System.String> permissionsToCheck

    The collection of permissions to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeBinAccessAsync(IUser, ISet<String>)

    Authorize that a user is allowed to perform actions on the content bin item.

    Declaration
    Task<ContentAuthorizationStatus> AuthorizeBinAccessAsync(IUser user, ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    ISet<System.String> permissionsToCheck

    The collection of permissions to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeBinAccessAsync(IUser, String)

    Authorize that a user is allowed to perform action on the content bin item.

    Declaration
    virtual Task<ContentAuthorizationStatus> AuthorizeBinAccessAsync(IUser user, string permissionToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    System.String permissionToCheck

    The permission to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeCultureAccessAsync(IUser, ISet<String>)

    Authorize that a user has access to specific cultures

    Declaration
    Task<ContentAuthorizationStatus> AuthorizeCultureAccessAsync(IUser user, ISet<string> culturesToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    ISet<System.String> culturesToCheck

    The collection of cultures to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeDescendantsAccessAsync(IUser, Guid, ISet<String>)

    Authorize that a user has access to the descendant items of a content item.

    Declaration
    Task<ContentAuthorizationStatus> AuthorizeDescendantsAccessAsync(IUser user, Guid parentKey, ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    Guid parentKey

    The identifier of the parent content item to check its descendants for access.

    ISet<System.String> permissionsToCheck

    The collection of permissions to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeDescendantsAccessAsync(IUser, Guid, String)

    Authorize that a user has access to the descendant items of a content item.

    Declaration
    virtual Task<ContentAuthorizationStatus> AuthorizeDescendantsAccessAsync(IUser user, Guid parentKey, string permissionToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    Guid parentKey

    The identifier of the parent content item to check its descendants for access.

    System.String permissionToCheck

    The permission to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeRootAccessAsync(IUser, ISet<String>)

    Authorize that a user is allowed to perform actions on the content root item.

    Declaration
    Task<ContentAuthorizationStatus> AuthorizeRootAccessAsync(IUser user, ISet<string> permissionsToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    ISet<System.String> permissionsToCheck

    The collection of permissions to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    View Source

    AuthorizeRootAccessAsync(IUser, String)

    Authorize that a user is allowed to perform action on the content root item.

    Declaration
    virtual Task<ContentAuthorizationStatus> AuthorizeRootAccessAsync(IUser user, string permissionToCheck)
    Parameters
    Type Name Description
    IUser user

    IUser to authorize.

    System.String permissionToCheck

    The permission to authorize.

    Returns
    Type Description
    Task<ContentAuthorizationStatus>

    A task resolving into a ContentAuthorizationStatus.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • AuthorizeAccessAsync(IUser, Guid, String)
      • AuthorizeAccessAsync(IUser, IEnumerable<Guid>, ISet<String>)
      • AuthorizeBinAccessAsync(IUser, ISet<String>)
      • AuthorizeBinAccessAsync(IUser, String)
      • AuthorizeCultureAccessAsync(IUser, ISet<String>)
      • AuthorizeDescendantsAccessAsync(IUser, Guid, ISet<String>)
      • AuthorizeDescendantsAccessAsync(IUser, Guid, String)
      • AuthorizeRootAccessAsync(IUser, ISet<String>)
      • AuthorizeRootAccessAsync(IUser, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX