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)
|
.map(([appId]) => appId)
|
||||||
}
|
}
|
||||||
for (let prodAppId of prodAppIds) {
|
for (let prodAppId of prodAppIds) {
|
||||||
|
const roleId = roles[prodAppId]
|
||||||
const devAppId = getDevelopmentAppID(prodAppId)
|
const devAppId = getDevelopmentAppID(prodAppId)
|
||||||
for (let appId of [prodAppId, devAppId]) {
|
for (let appId of [prodAppId, devAppId]) {
|
||||||
if (!(await doesDatabaseExist(appId))) {
|
if (!(await doesDatabaseExist(appId))) {
|
||||||
|
@ -115,6 +116,10 @@ exports.syncUser = async function (ctx) {
|
||||||
tableId: InternalTables.USER_METADATA,
|
tableId: InternalTables.USER_METADATA,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// assign the roleId for the metadata doc
|
||||||
|
if (roleId) {
|
||||||
|
metadata.roleId = roleId
|
||||||
|
}
|
||||||
let combined = !deleting
|
let combined = !deleting
|
||||||
? combineMetadataAndUser(user, metadata)
|
? combineMetadataAndUser(user, metadata)
|
||||||
: {
|
: {
|
||||||
|
|
Loading…
Reference in New Issue