Search Results for

    Show / Hide Table of Contents
    View Source

    Class ReadOnlyUserGroup

    Represents a read-only implementation of a user group providing basic information.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models.Membership
    Assembly: Umbraco.Core.dll
    Syntax
    public class ReadOnlyUserGroup : IReadOnlyUserGroup

    Constructors

    View Source

    ReadOnlyUserGroup(int, Guid, string?, string?, int?, int?, string?, IEnumerable<int>, IEnumerable<string>, ISet<string>, ISet<IGranularPermission>, bool)

    Initializes a new instance of the ReadOnlyUserGroup class.

    Declaration
    [Obsolete("Please use the constructor that includes all parameters. Scheduled for removal in Umbraco 19.")]
    public ReadOnlyUserGroup(int id, Guid key, string? name, string? icon, int? startContentId, int? startMediaId, string? alias, IEnumerable<int> allowedLanguages, IEnumerable<string> allowedSections, ISet<string> permissions, ISet<IGranularPermission> granularPermissions, bool hasAccessToAllLanguages)
    Parameters
    Type Name Description
    int id

    The unique identifier for the user group.

    Guid key

    The unique key for the user group.

    string name

    The name of the user group.

    string icon

    The icon for the user group.

    int? startContentId

    The starting content node identifier.

    int? startMediaId

    The starting media node identifier.

    string alias

    The alias of the user group.

    IEnumerable<int> allowedLanguages

    The collection of allowed language identifiers.

    IEnumerable<string> allowedSections

    The collection of allowed section aliases.

    ISet<string> permissions

    The set of permissions.

    ISet<IGranularPermission> granularPermissions

    The set of granular permissions.

    bool hasAccessToAllLanguages

    Indicates whether the group has access to all languages.

    View Source

    ReadOnlyUserGroup(int, Guid, string?, string?, string?, int?, int?, string?, IEnumerable<int>, IEnumerable<string>, ISet<string>, ISet<IGranularPermission>, bool)

    Initializes a new instance of the ReadOnlyUserGroup class.

    Declaration
    public ReadOnlyUserGroup(int id, Guid key, string? name, string? description, string? icon, int? startContentId, int? startMediaId, string? alias, IEnumerable<int> allowedLanguages, IEnumerable<string> allowedSections, ISet<string> permissions, ISet<IGranularPermission> granularPermissions, bool hasAccessToAllLanguages)
    Parameters
    Type Name Description
    int id

    The unique identifier for the user group.

    Guid key

    The unique key for the user group.

    string name

    The name of the user group.

    string description

    The description of the user group.

    string icon

    The icon for the user group.

    int? startContentId

    The starting content node identifier.

    int? startMediaId

    The starting media node identifier.

    string alias

    The alias of the user group.

    IEnumerable<int> allowedLanguages

    The collection of allowed language identifiers.

    IEnumerable<string> allowedSections

    The collection of allowed section aliases.

    ISet<string> permissions

    The set of permissions.

    ISet<IGranularPermission> granularPermissions

    The set of granular permissions.

    bool hasAccessToAllLanguages

    Indicates whether the group has access to all languages.

    Properties

    View Source

    Alias

    Gets the alias of the user group.

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

    AllowedLanguages

    Gets the collection of language identifiers 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 the description of the user group.

    Declaration
    public string? Description { get; }
    Property Value
    Type Description
    string
    Remarks

    TODO (V18): Remove the default implementations.

    View Source

    GranularPermissions

    Gets the set of granular permissions assigned to this user group.

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

    HasAccessToAllLanguages

    Gets a value indicating whether this user group has access to all languages.

    Declaration
    public bool HasAccessToAllLanguages { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    This is set to return true as default to avoid breaking changes.

    View Source

    Icon

    Gets the icon for the user group.

    Declaration
    public string? Icon { get; }
    Property Value
    Type Description
    string
    View Source

    Id

    Gets the unique identifier for the user group.

    Declaration
    public int Id { get; }
    Property Value
    Type Description
    int
    View Source

    Key

    Gets the unique key for the user group.

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

    Name

    Gets the name of the user group.

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

    Permissions

    Gets the set of permissions assigned to this user group.

    Declaration
    public ISet<string> Permissions { get; }
    Property Value
    Type Description
    ISet<string>
    View Source

    StartContentId

    Gets the starting content node identifier for this user group.

    Declaration
    public int? StartContentId { get; }
    Property Value
    Type Description
    int?
    View Source

    StartMediaId

    Gets the starting media node identifier for this user group.

    Declaration
    public int? StartMediaId { get; }
    Property Value
    Type Description
    int?

    Methods

    View Source

    Equals(object?)

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    Equals(ReadOnlyUserGroup?)

    Declaration
    public bool Equals(ReadOnlyUserGroup? other)
    Parameters
    Type Name Description
    ReadOnlyUserGroup other
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

    operator ==(ReadOnlyUserGroup, ReadOnlyUserGroup)

    Determines whether two ReadOnlyUserGroup instances are equal.

    Declaration
    public static bool operator ==(ReadOnlyUserGroup left, ReadOnlyUserGroup right)
    Parameters
    Type Name Description
    ReadOnlyUserGroup left

    The first instance to compare.

    ReadOnlyUserGroup right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are equal; otherwise, false.

    View Source

    operator !=(ReadOnlyUserGroup, ReadOnlyUserGroup)

    Determines whether two ReadOnlyUserGroup instances are not equal.

    Declaration
    public static bool operator !=(ReadOnlyUserGroup left, ReadOnlyUserGroup right)
    Parameters
    Type Name Description
    ReadOnlyUserGroup left

    The first instance to compare.

    ReadOnlyUserGroup right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are not equal; otherwise, false.

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