View Source
Class UserGroup
Represents a Group for a Backoffice User
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[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
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 |
|
| int |
userCount |
|
| string |
alias |
|
| string |
name |
|
| string |
icon |
|
Properties
View Source
Alias
Declaration
[DataMember]
public string Alias { get; set; }
Property Value
View Source
AllowedLanguages
Declaration
public IEnumerable<int> AllowedLanguages { get; }
Property Value
| Type |
Description |
| IEnumerable<int> |
|
View Source
AllowedSections
Declaration
public IEnumerable<string> AllowedSections { get; }
Property Value
| Type |
Description |
| IEnumerable<string> |
|
View Source
GranularPermissions
Declaration
public ISet<IGranularPermission> GranularPermissions { get; set; }
Property Value
View Source
HasAccessToAllLanguages
If this property is true it will give the group access to all languages
This is set to return true as default to avoid breaking changes
Declaration
[DataMember]
public bool HasAccessToAllLanguages { get; set; }
Property Value
View Source
Icon
Declaration
[DataMember]
public string? Icon { get; set; }
Property Value
View Source
Name
Declaration
[DataMember]
public string? Name { get; set; }
Property Value
View Source
Permissions
The set of permissions provided by the frontend.
Declaration
public ISet<string> Permissions { get; set; }
Property Value
| Type |
Description |
| ISet<string> |
|
View Source
StartContentId
Declaration
[DataMember]
public int? StartContentId { get; set; }
Property Value
View Source
Declaration
[DataMember]
public int? StartMediaId { get; set; }
Property Value
View Source
UserCount
Specifies the number of users assigned to this group
Declaration
public int UserCount { get; }
Property Value
Methods
View Source
AddAllowedLanguage(int)
Declaration
public void AddAllowedLanguage(int languageId)
Parameters
| Type |
Name |
Description |
| int |
languageId |
|
View Source
AddAllowedSection(string)
Declaration
public void AddAllowedSection(string sectionAlias)
Parameters
| Type |
Name |
Description |
| string |
sectionAlias |
|
View Source
ClearAllowedLanguages()
Declaration
public void ClearAllowedLanguages()
View Source
ClearAllowedSections()
Declaration
public void ClearAllowedSections()
View Source
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)
Declaration
public void RemoveAllowedLanguage(int languageId)
Parameters
| Type |
Name |
Description |
| int |
languageId |
|
View Source
RemoveAllowedSection(string)
Declaration
public void RemoveAllowedSection(string sectionAlias)
Parameters
| Type |
Name |
Description |
| string |
sectionAlias |
|