Adding role, as it wasn't being set in metadata.
This commit is contained in:
parent
45af6be6de
commit
9b5909e367
|
@ -97,6 +97,7 @@ exports.syncUser = async function (ctx) {
|
|||
.map(([appId]) => appId)
|
||||
}
|
||||
for (let prodAppId of prodAppIds) {
|
||||
const roleId = roles[prodAppId]
|
||||
const devAppId = getDevelopmentAppID(prodAppId)
|
||||
for (let appId of [prodAppId, devAppId]) {
|
||||
if (!(await doesDatabaseExist(appId))) {
|
||||
|
@ -115,6 +116,10 @@ exports.syncUser = async function (ctx) {
|
|||
tableId: InternalTables.USER_METADATA,
|
||||
}
|
||||
}
|
||||
// assign the roleId for the metadata doc
|
||||
if (roleId) {
|
||||
metadata.roleId = roleId
|
||||
}
|
||||
let combined = !deleting
|
||||
? combineMetadataAndUser(user, metadata)
|
||||
: {
|
||||
|
|
Loading…
Reference in New Issue