default to public in UI

This commit is contained in:
Martin McKeaveney 2021-07-06 17:19:03 +01:00
parent 25fd9cd54f
commit 68df47e22f
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -33,7 +33,7 @@
role: {},
}
$: defaultRoleId = $userFetch?.data?.builder?.global ? "ADMIN" : ""
$: defaultRoleId = $userFetch?.data?.builder?.global ? "ADMIN" : "PUBLIC"
// Merge the Apps list and the roles response to get something that makes sense for the table
$: appList = Object.keys($apps?.data).map(id => {
const role = $userFetch?.data?.roles?.[id] || defaultRoleId