wip: zen style model

This commit is contained in:
Frank
2025-10-10 00:02:04 -04:00
parent bc0e00cbb7
commit 03d5089436
7 changed files with 133 additions and 49 deletions

View File

@@ -67,6 +67,11 @@ export namespace Actor {
return actor as Extract<Info, { type: T }>
}
export const assertAdmin = () => {
if (userRole() === "admin") return
throw new Error(`Expected admin user, got ${userRole()}`)
}
export function workspace() {
const actor = use()
if ("workspaceID" in actor.properties) {