Merge branch 'develop' into adiDev
This commit is contained in:
commit
6f1e2339f5
1 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ export class KeycloakController extends Controller {
|
||||||
firstName?: string;
|
firstName?: string;
|
||||||
lastName?: string;
|
lastName?: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
roles?: string[];
|
roles: string[];
|
||||||
profileId?: string;
|
profileId?: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
|
|
@ -105,6 +105,12 @@ export class KeycloakController extends Controller {
|
||||||
if (typeof userId !== "string") {
|
if (typeof userId !== "string") {
|
||||||
throw new Error(userId.errorMessage);
|
throw new Error(userId.errorMessage);
|
||||||
}
|
}
|
||||||
|
const list = await getRoles();
|
||||||
|
if (!Array.isArray(list)) throw new Error("Failed. Cannot get role(s) data from the server.");
|
||||||
|
const result = await addUserRoles(
|
||||||
|
userId,
|
||||||
|
list.filter((v) => body.roles.includes(v.id)),
|
||||||
|
);
|
||||||
|
|
||||||
const now = new Date().toISOString();
|
const now = new Date().toISOString();
|
||||||
const folderData: any = {
|
const folderData: any = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue