1
0
Fork 0
mirror of synced 2024-07-09 00:06:05 +12:00

Fixing an issue with page not loading.

This commit is contained in:
mike12345567 2021-05-28 18:54:30 +01:00
parent 89fce7b2e3
commit dfd1815041
2 changed files with 1307 additions and 18 deletions

View file

@ -9,7 +9,8 @@ function getAppRole(appId, user) {
if (!user.roles) { if (!user.roles) {
return user return user
} }
user.roleId = user.roles[appId] // always use the deployed app
user.roleId = user.roles[getDeployedAppID(appId)]
if (!user.roleId) { if (!user.roleId) {
user.roleId = BUILTIN_ROLE_IDS.PUBLIC user.roleId = BUILTIN_ROLE_IDS.PUBLIC
} }
@ -97,8 +98,7 @@ exports.deleteGlobalUser = async (ctx, globalId) => {
} }
exports.getGlobalUsers = async (ctx, appId = null, globalId = null) => { exports.getGlobalUsers = async (ctx, appId = null, globalId = null) => {
// always use the deployed app
appId = getDeployedAppID(appId)
const endpoint = globalId const endpoint = globalId
? `/api/admin/users/${globalId}` ? `/api/admin/users/${globalId}`
: `/api/admin/users` : `/api/admin/users`
@ -136,7 +136,6 @@ exports.getGlobalSelf = async (ctx, appId = null) => {
} }
exports.addAppRoleToUser = async (ctx, appId, roleId, userId = null) => { exports.addAppRoleToUser = async (ctx, appId, roleId, userId = null) => {
appId = getDeployedAppID(appId)
let user, let user,
endpoint, endpoint,
body = {} body = {}

File diff suppressed because it is too large Load diff