Merge branch 'develop-Bright' into develop
This commit is contained in:
commit
77c7574809
1 changed files with 11 additions and 2 deletions
|
|
@ -79,6 +79,7 @@ export class KeycloakController extends Controller {
|
||||||
firstName?: string;
|
firstName?: string;
|
||||||
lastName?: string;
|
lastName?: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
|
roles?: string[];
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const userId = await createUser(body.username, body.password, {
|
const userId = await createUser(body.username, body.password, {
|
||||||
|
|
@ -128,7 +129,10 @@ export class KeycloakController extends Controller {
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// io.getInstance()?.emit("FolderCreate", folderData);
|
// io.getInstance()?.emit("FolderCreate", folderData);
|
||||||
|
const _roles = {
|
||||||
|
role: body.roles || [],
|
||||||
|
};
|
||||||
|
const addRole = await this.addRole(userId, _roles);
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,8 @@ export class KeycloakController extends Controller {
|
||||||
firstName?: string;
|
firstName?: string;
|
||||||
lastName?: string;
|
lastName?: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
attributes?: object
|
attributes?: object;
|
||||||
|
// roles?: string[];
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
// return await editUser(userId, body);
|
// return await editUser(userId, body);
|
||||||
|
|
@ -150,6 +155,10 @@ export class KeycloakController extends Controller {
|
||||||
if (typeof chkUpdate !== "boolean") {
|
if (typeof chkUpdate !== "boolean") {
|
||||||
throw new Error(chkUpdate.errorMessage);
|
throw new Error(chkUpdate.errorMessage);
|
||||||
}
|
}
|
||||||
|
// const _rolesUpdate = {
|
||||||
|
// role: body.roles || [],
|
||||||
|
// };
|
||||||
|
// const addRole = await this.addRole(userId, _rolesUpdate);
|
||||||
return chkUpdate
|
return chkUpdate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue