WIP jordan

This commit is contained in:
Jordan Weingarten
2026-04-16 11:11:44 -05:00
parent ff2d7b18b5
commit 67482f6629
163 changed files with 50627 additions and 728 deletions

View File

@@ -0,0 +1,21 @@
/**
* Tenant-level admin (company logo, legal name, etc.).
* Wire to real roles/claims when auth exists. Until then:
* - localStorage `policy-ui.superadmin` = `1` | `0`
* - in dev, defaults to true when the key is unset so the org screen is reachable
*/
export function useSuperAdmin() {
const isSuperAdmin = computed(() => {
if (!import.meta.client) return false
try {
const v = localStorage.getItem('policy-ui.superadmin')
if (v === '1') return true
if (v === '0') return false
return import.meta.dev
} catch {
return false
}
})
return { isSuperAdmin }
}