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

@@ -145,11 +145,13 @@ namespace HRD.LDAPService
public static bool IsJwtGlobalsRole(string roleName)
{
//TODO: Import them from db or config (etc. appsettigns.json)
return string.Equals(roleName, JwtGlobals.ROLE_USER, StringComparison.OrdinalIgnoreCase)
|| string.Equals(roleName, JwtGlobals.ROLE_DEPARTMENTUSER, StringComparison.OrdinalIgnoreCase)
|| string.Equals(roleName, JwtGlobals.ROLE_DEPARTMENTMASTER, StringComparison.OrdinalIgnoreCase)
|| string.Equals(roleName, JwtGlobals.ROLE_MASTER, StringComparison.OrdinalIgnoreCase)
|| string.Equals(roleName, JwtGlobals.ROLE_ADMIN, StringComparison.OrdinalIgnoreCase);
|| string.Equals(roleName, JwtGlobals.ROLE_ADMIN, StringComparison.OrdinalIgnoreCase)
|| string.Equals(roleName, JwtGlobals.ROLE_DD_ADMIN, StringComparison.OrdinalIgnoreCase);
}
public void AddExtendedAttribute(string key, string value)
@@ -246,7 +248,7 @@ namespace HRD.LDAPService
break;
case EN_LdapRoleListFilter.OnlyRoleList:
if (IsJwtGlobalsRole(item.Role)) { resultList.Add(item.Role); }
if (IsJwtGlobalsRole(item.Role)){ resultList.Add(item.Role); }
break;
case EN_LdapRoleListFilter.OnlyWebAppRoleList: