Interface IUserGroup
Represents a user group in Umbraco.
Namespace: Umbraco.Cms.Core.Models.Membership
Assembly: Umbraco.Core.dll
Syntax
public interface IUserGroup : IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Properties
View SourceAlias
Gets or sets the alias of the user group.
Declaration
string Alias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AllowedLanguages
Gets the collection of language IDs that this user group has access to.
Declaration
IEnumerable<int> AllowedLanguages { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<int> |
AllowedSections
Gets the collection of section aliases that this user group has access to.
Declaration
IEnumerable<string> AllowedSections { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Description
Gets or sets the description of the user group.
Declaration
string? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
TODO (V18): Remove the default implementations.
GranularPermissions
Gets or sets the granular permissions for this user group.
Declaration
ISet<IGranularPermission> GranularPermissions { get; set; }
Property Value
| Type | Description |
|---|---|
| ISet<IGranularPermission> |
HasAccessToAllLanguages
If this property is true it will give the group access to all languages
Declaration
bool HasAccessToAllLanguages { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Icon
The icon
Declaration
string? Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Name
The name
Declaration
string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Permissions
The set of permissions provided by the frontend.
Declaration
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.
StartContentId
Gets or sets the starting content node ID for this user group.
Declaration
int? StartContentId { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
StartMediaId
Gets or sets the starting media node ID for this user group.
Declaration
int? StartMediaId { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
UserCount
Specifies the number of users assigned to this group
Declaration
int UserCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceAddAllowedLanguage(int)
Adds access to a language for this user group.
Declaration
void AddAllowedLanguage(int languageId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | languageId | The ID of the language to add. |
AddAllowedSection(string)
Adds access to a section for this user group.
Declaration
void AddAllowedSection(string sectionAlias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sectionAlias | The alias of the section to add. |
ClearAllowedLanguages()
Removes access to all languages for this user group.
Declaration
void ClearAllowedLanguages()
ClearAllowedSections()
Removes access to all sections for this user group.
Declaration
void ClearAllowedSections()
RemoveAllowedLanguage(int)
Removes access to a language for this user group.
Declaration
void RemoveAllowedLanguage(int languageId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | languageId | The ID of the language to remove. |
RemoveAllowedSection(string)
Removes access to a section for this user group.
Declaration
void RemoveAllowedSection(string sectionAlias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sectionAlias | The alias of the section to remove. |