Implemented notification strategy

This commit is contained in:
2026-10-22 22:59:33 +02:00
parent 7071c404f0
commit 46c6ddcc80
11 changed files with 784 additions and 71 deletions
@@ -520,7 +520,7 @@ export async function resolveUserRolesAndClaims(
export async function preloadAndCacheAllRoleClaims(): Promise<void> {
const roles = await fetchAndCacheSystemRoles();
await Promise.allSettled(
roles.map((role) => fetchAndCacheRoleClaims(role.id, role.name))
roles.map((role) => fetchAndCacheRoleClaims(role.id || role.Id || '', role.name || role.Name || ''))
);
}
@@ -563,7 +563,7 @@ export async function getSystemClaims(): Promise<Claim[]> {
try {
const roles = await fetchAndCacheSystemRoles();
for (const r of roles) {
const claims = await fetchAndCacheRoleClaims(r.id, r.name);
const claims = await fetchAndCacheRoleClaims(r.id || r.Id || '', r.name || r.Name || '');
claims.forEach((c) => {
const norm = normalizeClaim(c);
if (norm.claimType && !claimsMap.has(norm.claimType)) {