Adding role, as it wasn't being set in metadata.
This commit is contained in:
parent
ce47eb6cff
commit
0f54787072
|
@ -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