feat: add groups to app ctx

This commit is contained in:
Ruben Fiszel
2023-07-04 23:58:42 +02:00
parent dda99206fa
commit 499dd5b8ea
4 changed files with 5 additions and 1 deletions

View File

@@ -72,6 +72,7 @@
const pickVariableCallback: Writable<((path: string) => void) | undefined> = writable(undefined)
let context = {
email: $userStore?.email,
groups: $userStore?.groups,
username: $userStore?.username,
query: Object.fromEntries($page.url.searchParams.entries()),
hash: $page.url.hash,

View File

@@ -168,7 +168,8 @@
isEditor={false}
context={{
username: $userStore?.username ?? 'anonymous',
email: $userStore?.email ?? 'anonymous'
email: $userStore?.email ?? 'anonymous',
groups: $userStore?.groups ?? []
}}
summary={appViewerApp?.app.summary ?? ''}
noBackend

View File

@@ -36,6 +36,7 @@
context={{
email: $userStore?.email,
username: $userStore?.username,
groups: $userStore?.groups,
query: Object.fromEntries($page.url.searchParams.entries()),
hash: $page.url.hash
}}

View File

@@ -64,6 +64,7 @@
noBackend={false}
context={{
email: $userStore?.email,
groups: $userStore?.groups,
username: $userStore?.username,
query: Object.fromEntries($page.url.searchParams.entries()),
hash: $page.url.hash