default to public in UI
This commit is contained in:
parent
4e8b140c52
commit
561f824606
|
@ -226,7 +226,7 @@ exports.getAllRoles = async appId => {
|
||||||
dbRole => exports.getExternalRoleID(dbRole._id) === builtinRoleId
|
dbRole => exports.getExternalRoleID(dbRole._id) === builtinRoleId
|
||||||
)[0]
|
)[0]
|
||||||
if (dbBuiltin == null) {
|
if (dbBuiltin == null) {
|
||||||
roles.push(builtinRole || builtinRoles.PUBLIC)
|
roles.push(builtinRole)
|
||||||
} else {
|
} else {
|
||||||
// remove role and all back after combining with the builtin
|
// remove role and all back after combining with the builtin
|
||||||
roles = roles.filter(role => role._id !== dbBuiltin._id)
|
roles = roles.filter(role => role._id !== dbBuiltin._id)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
role: {},
|
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
|
// Merge the Apps list and the roles response to get something that makes sense for the table
|
||||||
$: appList = Object.keys($apps?.data).map(id => {
|
$: appList = Object.keys($apps?.data).map(id => {
|
||||||
const role = $userFetch?.data?.roles?.[id] || defaultRoleId
|
const role = $userFetch?.data?.roles?.[id] || defaultRoleId
|
||||||
|
|
Loading…
Reference in New Issue