mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-13 16:02:59 +00:00
* perf: load public raw apps without the loading screen * fix: keep license store and drop stale prefetches on public app pages * fix: answer raw app requests with an error when the job bridge fails to load --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
16 lines
489 B
TypeScript
16 lines
489 B
TypeScript
import type { User } from '$lib/gen/types.gen'
|
|
import type { UserExt } from './stores'
|
|
|
|
export function mapUserToUserExt(user: User, workspace: string): UserExt {
|
|
const ext: UserExt = {
|
|
...user,
|
|
workspace_id: workspace,
|
|
groups: user.groups!,
|
|
pgroups: user.groups!.map((x) => `g/${x}`)
|
|
}
|
|
if (ext.is_service_account && sessionStorage.getItem('pre_impersonation_token')) {
|
|
ext.impersonating_email = sessionStorage.getItem('pre_impersonation_email') ?? undefined
|
|
}
|
|
return ext
|
|
}
|