wip: zen style model
This commit is contained in:
parent
bc0e00cbb7
commit
03d5089436
7 changed files with 133 additions and 49 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue