Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeIdentityUser

    The identity user used for the back office

    Inheritance
    object
    IdentityUser<string>
    IdentityUser
    UmbracoIdentityUser
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class BackOfficeIdentityUser : UmbracoIdentityUser, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    BackOfficeIdentityUser(GlobalSettings, int, IEnumerable<IReadOnlyUserGroup>)

    Initializes a new instance of the BackOfficeIdentityUser class.

    Declaration
    public BackOfficeIdentityUser(GlobalSettings globalSettings, int userId, IEnumerable<IReadOnlyUserGroup> groups)
    Parameters
    Type Name Description
    GlobalSettings globalSettings
    int userId
    IEnumerable<IReadOnlyUserGroup> groups

    Properties

    View Source

    AllowedSections

    Gets a readonly list of the user's allowed sections which are based on it's user groups

    Declaration
    public string[] AllowedSections { get; }
    Property Value
    Type Description
    string[]
    View Source

    CalculatedContentStartNodeIds

    Gets or sets the set of content start node IDs that have been calculated for this back office identity user, typically based on their group memberships and permissions. These IDs determine the root content nodes the user can access in the back office.

    Declaration
    public int[]? CalculatedContentStartNodeIds { get; set; }
    Property Value
    Type Description
    int[]
    View Source

    CalculatedMediaStartNodeIds

    Gets or sets the calculated media start node IDs for the back office identity user. These IDs represent the root media nodes that the user has access to, typically determined by user group permissions or configuration.

    Declaration
    public int[]? CalculatedMediaStartNodeIds { get; set; }
    Property Value
    Type Description
    int[]
    View Source

    Culture

    Gets or sets the culture

    Declaration
    public string Culture { get; set; }
    Property Value
    Type Description
    string
    View Source

    InviteDate

    Gets or sets invite date

    Declaration
    public DateTime? InviteDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    Key

    Gets or sets the unique key that identifies the back office identity user.

    Declaration
    public Guid Key { get; set; }
    Property Value
    Type Description
    Guid
    View Source

    Kind

    Gets or sets the classification of the back office user, indicating the user's type or role within the system.

    Declaration
    public UserKind Kind { get; set; }
    Property Value
    Type Description
    UserKind
    View Source

    StartContentIds

    Gets or sets content start nodes assigned to the User (not ones assigned to the user's groups)

    Declaration
    public int[] StartContentIds { get; set; }
    Property Value
    Type Description
    int[]
    View Source

    StartMediaIds

    Gets or sets media start nodes assigned to the User (not ones assigned to the user's groups)

    Declaration
    public int[] StartMediaIds { get; set; }
    Property Value
    Type Description
    int[]

    Methods

    View Source

    CreateNew(GlobalSettings, string?, string, string, string?, Guid?, UserKind)

    Creates a new BackOfficeIdentityUser instance without an identity, for use before the user is persisted.

    Declaration
    public static BackOfficeIdentityUser CreateNew(GlobalSettings globalSettings, string? username, string email, string culture, string? name = null, Guid? id = null, UserKind kind = UserKind.Default)
    Parameters
    Type Name Description
    GlobalSettings globalSettings

    The global settings used to initialize the user instance.

    string username

    The username for the new user. Cannot be null or whitespace.

    string email

    The email address for the user. This can be null, but must be set before persisting the user.

    string culture

    The culture assigned to the user. Cannot be null or whitespace.

    string name

    The display name of the user. Optional.

    Guid? id

    The unique identifier for the user. Optional; if not provided, a new one will be generated.

    UserKind kind

    The kind of user. Optional; defaults to Default.

    Returns
    Type Description
    BackOfficeIdentityUser

    A new instance of BackOfficeIdentityUser without an identity.

    View Source

    SetGroups(IReadOnlyCollection<IReadOnlyUserGroup>)

    Sets the user groups for the backoffice identity user and updates related roles.

    Declaration
    public void SetGroups(IReadOnlyCollection<IReadOnlyUserGroup> value)
    Parameters
    Type Name Description
    IReadOnlyCollection<IReadOnlyUserGroup> value

    The collection of user groups to assign to the user.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX