Search Results for

    Show / Hide Table of Contents
    View Source

    Class UserGroup

    Represents a Group for a Backoffice User

    Inheritance
    object
    BeingDirtyBase
    EntityBase
    Namespace: Umbraco.Cms.Core.Models.Membership
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class UserGroup : EntityBase, IUserGroup, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty, IReadOnlyUserGroup

    Constructors

    View Source

    UserGroup(IShortStringHelper)

    Constructor to create a new user group

    Declaration
    public UserGroup(IShortStringHelper shortStringHelper)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper

    The short string helper for alias processing.

    View Source

    UserGroup(IShortStringHelper, int, string?, string?, string?)

    Constructor to create an existing user group.

    Declaration
    public UserGroup(IShortStringHelper shortStringHelper, int userCount, string? alias, string? name, string? icon)
    Parameters
    Type Name Description
    IShortStringHelper shortStringHelper

    The short string helper.

    int userCount

    The user count.

    string alias

    The alias.

    string name

    The name.

    string icon

    The icon.

    Properties

    View Source

    Alias

    Gets or sets the alias of the user group.

    Declaration
    [DataMember]
    public string Alias { get; set; }
    Property Value
    Type Description
    string
    View Source

    AllowedLanguages

    Gets the collection of language IDs that this user group has access to.

    Declaration
    public IEnumerable<int> AllowedLanguages { get; }
    Property Value
    Type Description
    IEnumerable<int>
    View Source

    AllowedSections

    Gets the collection of section aliases that this user group has access to.

    Declaration
    public IEnumerable<string> AllowedSections { get; }
    Property Value
    Type Description
    IEnumerable<string>
    View Source

    Description

    Gets or sets the description of the user group.

    Declaration
    [DataMember]
    public string? Description { get; set; }
    Property Value
    Type Description
    string
    Remarks

    TODO (V18): Remove the default implementations.

    View Source

    GranularPermissions

    Gets or sets the granular permissions for this user group.

    Declaration
    public ISet<IGranularPermission> GranularPermissions { get; set; }
    Property Value
    Type Description
    ISet<IGranularPermission>
    View Source

    HasAccessToAllLanguages

    If this property is true it will give the group access to all languages

    Declaration
    [DataMember]
    public bool HasAccessToAllLanguages { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Icon

    The icon

    Declaration
    [DataMember]
    public string? Icon { get; set; }
    Property Value
    Type Description
    string
    View Source

    Name

    The name

    Declaration
    [DataMember]
    public string? Name { get; set; }
    Property Value
    Type Description
    string
    View Source

    Permissions

    The set of permissions provided by the frontend.

    Declaration
    public ISet<string> Permissions { get; set; }
    Property Value
    Type Description
    ISet<string>
    Remarks

    By default the server has no concept of what all of these strings mean, we simple store them and return them to the UI.

    View Source

    StartContentId

    Gets or sets the starting content node ID for this user group.

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

    StartMediaId

    Gets or sets the starting media node ID for this user group.

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

    UserCount

    Specifies the number of users assigned to this group

    Declaration
    public int UserCount { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    AddAllowedLanguage(int)

    Adds access to a language for this user group.

    Declaration
    public void AddAllowedLanguage(int languageId)
    Parameters
    Type Name Description
    int languageId

    The ID of the language to add.

    View Source

    AddAllowedSection(string)

    Adds access to a section for this user group.

    Declaration
    public void AddAllowedSection(string sectionAlias)
    Parameters
    Type Name Description
    string sectionAlias

    The alias of the section to add.

    View Source

    ClearAllowedLanguages()

    Removes access to all languages for this user group.

    Declaration
    public void ClearAllowedLanguages()
    View Source

    ClearAllowedSections()

    Removes access to all sections for this user group.

    Declaration
    public void ClearAllowedSections()
    View Source

    PerformDeepClone(object)

    Used by inheritors to modify the DeepCloning logic

    Declaration
    protected override void PerformDeepClone(object clone)
    Parameters
    Type Name Description
    object clone
    View Source

    RemoveAllowedLanguage(int)

    Removes access to a language for this user group.

    Declaration
    public void RemoveAllowedLanguage(int languageId)
    Parameters
    Type Name Description
    int languageId

    The ID of the language to remove.

    View Source

    RemoveAllowedSection(string)

    Removes access to a section for this user group.

    Declaration
    public void RemoveAllowedSection(string sectionAlias)
    Parameters
    Type Name Description
    string sectionAlias

    The alias of the section to remove.

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