feat: Benutzerrollen und JWT-Konfiguration aktualisieren

- Benutzerrollen-Enums im Frontend aktualisiert, um die neuen Namenskonventionen für 'sDigital Data'-Rollen zu reflektieren.
- Neue Rollen in `JwtGlobals` für Digital Data-Administratoren und Benutzer hinzugefügt.
- Die Rolleneinstellungen in `LdapUser` erweitert, um neue Digital Data-Rollen einzubeziehen.
- `JwtMiddlewareOptionsHelper` modifiziert, um zusätzliche Rollen zu unterstützen und die JWT-Rollenliste entsprechend strukturiert.
This commit is contained in:
Developer 02
2024-08-27 11:58:50 +02:00
parent 1d8ae2c371
commit c362cb30e1
5 changed files with 15 additions and 5 deletions

View File

@@ -16,11 +16,14 @@ namespace StaffDBServer.Extends
//Admin Role
list.Add(new JwtRole(JwtGlobals.ROLE_ADMIN, "GG_WebApp" + ADGroupPrefix + "_StaffDB_Admin"));
//TODO: get roles from db
//Core RoleList
list.Add(new JwtRole(JwtGlobals.ROLE_USER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_User")); //(RO) nur eigene
list.Add(new JwtRole(JwtGlobals.ROLE_MASTER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_Master")); //RW ALLE Abteilungen
list.Add(new JwtRole(JwtGlobals.ROLE_DEPARTMENTUSER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_DepartmentUser")); //(RW) auch andere aus eigener Abteilung
list.Add(new JwtRole(JwtGlobals.ROLE_DEPARTMENTMASTER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_DepartmentMaster")); //(RW) auch andere aus eigener Abteilung
list.Add(new JwtRole(JwtGlobals.ROLE_DD_ADMIN, JwtGlobals.ROLE_DD_ADMIN)); //(RW) auch andere aus eigener Abteilung
list.Add(new JwtRole(JwtGlobals.ROLE_DD_USER, JwtGlobals.ROLE_DD_USER));
JwtMiddlewareOptions options = new JwtMiddlewareOptions()
{

View File

@@ -116,6 +116,7 @@ try
opts => opts.CommandTimeout((int)TimeSpan.FromMinutes(dbTimeoutInMin).TotalSeconds));
});
// Add repositories in DAL
builder.Services.AddStaffDBRepositories();
builder.Services.AddScoped<WebAppUserHelper>();
builder.Services.AddJwtManagerWithLdap(configuration.GetSection("LdapOptions"));