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:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user