refactor: filter out system role
This commit is contained in:
parent
ab08492304
commit
4be62e6bd2
1 changed files with 3 additions and 1 deletions
|
|
@ -42,7 +42,9 @@ export class KeycloakController extends Controller {
|
||||||
if (Array.isArray(role))
|
if (Array.isArray(role))
|
||||||
return role.filter(
|
return role.filter(
|
||||||
(a) =>
|
(a) =>
|
||||||
!["uma_authorization", "offline_access", "default-roles"].some((b) => a.name.includes(b)),
|
!["uma_authorization", "offline_access", "default-roles", "system"].some((b) =>
|
||||||
|
a.name.includes(b),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
throw new Error("Failed. Cannot get role.");
|
throw new Error("Failed. Cannot get role.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue