Added groups view model, implemented basic groups table view

This commit is contained in:
2025-10-11 13:29:59 +02:00
parent d9127736d9
commit fd5dcb5618
5 changed files with 65 additions and 20 deletions

View File

@@ -7,12 +7,14 @@ namespace Berufsschule_HAM.Models;
public class GroupModel
{
public required string Cn { get; set; }
public string DisplayName { get; set; }
public string? GidNumber { get; set; }
public List<GroupPermission> Permissions { get; set; }
public GroupModel(Dictionary<string, string> ldapData)
{
Cn = ldapData.GetValueOrDefault("cn") ?? throw new GroupModelConfigurationException();
GidNumber = ldapData.GetValueOrDefault("gidNumber");
DisplayName = ldapData.GetValueOrDefault("displayName") ?? Cn;
string? descriptionValue = ldapData.GetValueOrDefault("description");
if (descriptionValue is null)
{