Files
shd.build/src/routes/+layout.server.ts
T
jb dd84dff055
Validate and deploy production / validate (push) Successful in 23s
Validate and deploy staging / validate (push) Successful in 50s
Validate and deploy production / deploy (push) Failing after 40s
Validate and deploy staging / deploy (push) Failing after 7s
feat: add community publishing and news syndication
2026-08-01 21:42:09 -04:00

16 lines
625 B
TypeScript

import { getSessionUser } from '$lib/server/auth/session';
import { hasPermission } from '$lib/server/auth/authorization';
import type { LayoutServerLoad } from './$types';
import { notificationSummary } from '$lib/server/notifications';
import { getSiteAccessSettings } from '$lib/server/site-access';
export const load: LayoutServerLoad = async ({ cookies }) => {
const user = await getSessionUser(cookies);
return {
user,
isacAccess: await hasPermission(user, 'isac.access'),
notifications: user ? await notificationSummary(user.id) : { unread: 0 },
siteAccess: await getSiteAccessSettings(),
};
};