Implemented notification strategy
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user