refactor: session handling (#2398)

* refactor session handling

* simplify
This commit is contained in:
Bernd Storath
2026-01-13 10:11:13 +01:00
committed by GitHub
parent b85286f0ab
commit 51558c7027
11 changed files with 38 additions and 31 deletions
+5
View File
@@ -45,6 +45,11 @@ type SharedUserType =
| Pick<UserType, 'id' | 'role'>
| (Pick<UserType, 'id'> & { role: BrandedNumber });
export type SharedPublicUser = Pick<
UserType,
'id' | 'username' | 'name' | 'email' | 'totpVerified'
> & { role: BrandedNumber };
type PermissionCheck<Key extends keyof Permissions> =
| boolean
| ((user: SharedUserType, data: Permissions[Key]['dataType']) => boolean);