Class UserGroupDto
Data transfer object representing a user group in the Umbraco CMS infrastructure.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Persistence.Dtos
Assembly: Umbraco.Infrastructure.dll
Syntax
public class UserGroupDto
Constructors
View SourceUserGroupDto()
Initializes a new instance of the UserGroupDto class with default values.
Declaration
public UserGroupDto()
Fields
View SourceKeyColumnName
Declaration
public const string KeyColumnName = "key"
Field Value
| Type | Description |
|---|---|
| string |
PrimaryKeyColumnName
Declaration
public const string PrimaryKeyColumnName = "id"
Field Value
| Type | Description |
|---|---|
| string |
TableName
Declaration
public const string TableName = "umbracoUserGroup"
Field Value
| Type | Description |
|---|---|
| string |
Properties
View SourceAlias
Gets or sets the alias of the user group.
Declaration
[Length(200)]
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoUserGroup_userGroupAlias")]
public string? Alias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CreateDate
Gets or sets the date and time when the user group was created.
Declaration
[NullSetting(NullSetting = NullSettings.NotNull)]
[Constraint(Default = SystemMethods.CurrentUTCDateTime)]
public DateTime CreateDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
DefaultPermissions
Gets or sets the default permissions assigned to the user group.
Declaration
[Length(50)]
[NullSetting(NullSetting = NullSettings.Null)]
[Obsolete("Is not used anymore. Use UserGroup2PermissionDtos instead. Scheduled for removal in Umbraco 18.")]
public string? DefaultPermissions { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This property is obsolete and no longer used. Use UserGroup2PermissionDtos instead.
Scheduled for removal in Umbraco 18.
Description
Gets or sets a textual description providing additional information about the user group.
Declaration
[SpecialDbType(SpecialDbTypes.NVARCHARMAX)]
[NullSetting(NullSetting = NullSettings.Null)]
public string? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HasAccessToAllLanguages
Gets or sets a value indicating whether the user group has access to all languages.
Declaration
[NullSetting(NullSetting = NullSettings.NotNull)]
public bool HasAccessToAllLanguages { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Icon
Gets or sets the icon associated with the user group.
Declaration
[NullSetting(NullSetting = NullSettings.Null)]
public string? Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Id
Gets or sets the unique identifier for the user group.
Declaration
[PrimaryKeyColumn(IdentitySeed = 6)]
public int Id { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Key
Gets or sets the unique identifier key for the user group.
Declaration
[NullSetting(NullSetting = NullSettings.NotNull)]
[Constraint(Default = SystemMethods.NewGuid)]
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoUserGroup_userGroupKey")]
public Guid Key { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
Name
Gets or sets the name of the user group.
Declaration
[Length(200)]
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoUserGroup_userGroupName")]
public string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
StartContentId
Gets or sets the ID of the root content node that members of the user group start at in the content tree. A null value indicates no specific start node is set.
Declaration
[NullSetting(NullSetting = NullSettings.Null)]
[ForeignKey(typeof(NodeDto), Name = "FK_startContentId_umbracoNode_id")]
public int? StartContentId { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
StartMediaId
Gets or sets the identifier of the media item that defines the starting point for media access for the user group.
Declaration
[NullSetting(NullSetting = NullSettings.Null)]
[ForeignKey(typeof(NodeDto), Name = "FK_startMediaId_umbracoNode_id")]
public int? StartMediaId { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
UpdateDate
Gets or sets the date and time when the user group was last updated.
Declaration
[NullSetting(NullSetting = NullSettings.NotNull)]
[Constraint(Default = SystemMethods.CurrentUTCDateTime)]
public DateTime UpdateDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
UserCount
This is only relevant when this column is included in the results (i.e. GetUserGroupsWithUserCounts).
Declaration
public int UserCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
UserGroup2AppDtos
Gets or sets the collection of application associations for this user group.
Declaration
public List<UserGroup2AppDto> UserGroup2AppDtos { get; set; }
Property Value
| Type | Description |
|---|---|
| List<UserGroup2AppDto> |
UserGroup2GranularPermissionDtos
Gets or sets the list of granular permissions associated with the user group.
Declaration
public List<UserGroup2GranularPermissionDto> UserGroup2GranularPermissionDtos { get; set; }
Property Value
| Type | Description |
|---|---|
| List<UserGroup2GranularPermissionDto> |
UserGroup2LanguageDtos
Gets or sets the collection of UserGroup2LanguageDto entities that define the languages associated with this user group. This property represents the many-to-many relationship between user groups and languages.
Declaration
public List<UserGroup2LanguageDto> UserGroup2LanguageDtos { get; set; }
Property Value
| Type | Description |
|---|---|
| List<UserGroup2LanguageDto> |
UserGroup2PermissionDtos
Gets or sets the collection of permission mappings associated with this user group. Each item represents a link between the user group and a specific permission.
Declaration
public List<UserGroup2PermissionDto> UserGroup2PermissionDtos { get; set; }
Property Value
| Type | Description |
|---|---|
| List<UserGroup2PermissionDto> |