1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

default users without roles to public role

This commit is contained in:
Martin McKeaveney 2021-07-06 17:13:02 +01:00
parent 788f517b04
commit 25fd9cd54f

View file

@ -226,7 +226,7 @@ exports.getAllRoles = async appId => {
dbRole => exports.getExternalRoleID(dbRole._id) === builtinRoleId
)[0]
if (dbBuiltin == null) {
roles.push(builtinRole)
roles.push(builtinRole || builtinRoles.PUBLIC)
} else {
// remove role and all back after combining with the builtin
roles = roles.filter(role => role._id !== dbBuiltin._id)