ensure auth access for builder and admins
This commit is contained in:
parent
6c555c121c
commit
690ff373cd
|
@ -43,10 +43,11 @@
|
||||||
)
|
)
|
||||||
let userApps = []
|
let userApps = []
|
||||||
$: publishedApps = $apps.filter(publishedAppsOnly)
|
$: publishedApps = $apps.filter(publishedAppsOnly)
|
||||||
|
$: console.log($auth.user)
|
||||||
$: {
|
$: {
|
||||||
if (!Object.keys($auth.user?.roles).length && $auth.user?.userGroups) {
|
if (!Object.keys($auth.user?.roles).length && $auth.user?.userGroups) {
|
||||||
userApps = $auth.user?.builder?.global
|
userApps =
|
||||||
|
$auth.user?.builder?.global || $auth.user?.admin?.global
|
||||||
? publishedApps
|
? publishedApps
|
||||||
: publishedApps.filter(app => {
|
: publishedApps.filter(app => {
|
||||||
return userGroups.find(group => {
|
return userGroups.find(group => {
|
||||||
|
@ -56,7 +57,8 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
userApps = $auth.user?.builder?.global
|
userApps =
|
||||||
|
$auth.user?.builder?.global || $auth.user?.admin?.global
|
||||||
? publishedApps
|
? publishedApps
|
||||||
: publishedApps.filter(app =>
|
: publishedApps.filter(app =>
|
||||||
Object.keys($auth.user?.roles)
|
Object.keys($auth.user?.roles)
|
||||||
|
|
Loading…
Reference in New Issue