-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathUserGroupBase.cs
More file actions
87 lines (74 loc) · 2.88 KB
/
UserGroupBase.cs
File metadata and controls
87 lines (74 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using Umbraco.Cms.Api.Management.ViewModels.UserGroup.Permissions;
namespace Umbraco.Cms.Api.Management.ViewModels.UserGroup;
/// <summary>
/// <para>
/// Base class for front-end representation of a User Group.
/// </para>
/// <para>
/// Contains all the properties shared between Save, Update, Representation, etc...
/// </para>
/// </summary>
public class UserGroupBase
{
/// <summary>
/// The name of the user groups
/// </summary>
public required string Name { get; init; }
/// <summary>
/// The alias of the user groups
/// </summary>
public required string Alias { get; init; }
/// <summary>
/// The description of the user group
/// </summary>
public string? Description { get; set; }
/// <summary>
/// The Icon for the user group
/// </summary>
public string? Icon { get; init; }
/// <summary>
/// The sections that the user group has access to
/// </summary>
public required IEnumerable<string> Sections { get; init; }
/// <summary>
/// The languages that the user group has access to
/// </summary>
public required IEnumerable<string> Languages { get; init; }
/// <summary>
/// Flag indicating if the user group gives access to all languages, regardless of <see cref="UserGroupBase.Languages"/>.
/// </summary>
public required bool HasAccessToAllLanguages { get; init; }
/// <summary>
/// The key of the document that should act as root node for the user group
/// <remarks>
/// This can be overwritten by a different user group if a user is a member of multiple groups
/// </remarks>
/// </summary>
public ReferenceByIdModel? DocumentStartNode { get; init; }
/// <summary>
/// If the group should have access to the document root.
/// <remarks>
/// This will be ignored if an explicit start node has been specified in <see cref="DocumentStartNode"/>.
/// </remarks>
/// </summary>
public bool DocumentRootAccess { get; init; }
/// <summary>
/// The Id of the media that should act as root node for the user group
/// <remarks>
/// This can be overwritten by a different user group if a user is a member of multiple groups
/// </remarks>
/// </summary>
public ReferenceByIdModel? MediaStartNode { get; init; }
/// <summary>
/// If the group should have access to the media root.
/// <remarks>
/// This will be ignored if an explicit start node has been specified in <see cref="MediaStartNode"/>.
/// </remarks>
/// </summary>
public bool MediaRootAccess { get; init; }
/// <summary>
/// List of permissions provided, and maintained by the front-end. The server has no concept all of them, but some can be used on the server.
/// </summary>
public required ISet<string> FallbackPermissions { get; init; }
public required ISet<IPermissionPresentationModel> Permissions { get; init; }
}