mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
feat(auth): add access tier system for phased app releases
Introduces a tiered access control system so apps can be released gradually (founder → alpha → beta → public) without extra infrastructure. Users are gated at the AuthGate level based on their tier vs the app's requiredTier. All apps remain deployed and reachable, but only users with sufficient tier can enter. - Add accessTier enum + column to users schema (default: 'public') - Add tier claim to JWT payload in better-auth config - Add requiredTier field to ManaApp interface + all 25 apps - Add hasAppAccess(), getAccessibleManaApps(), ACCESS_TIER_LABELS - Update AuthGate with tier check + access denied screen - Update getPillAppItems + Home page to filter by user tier - Update all 22 app layouts to pass user tier to PillNav - Add admin API: GET/PUT /api/v1/admin/users/:id/tier - Document access tier system in CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f68215e68
commit
b737240ec1
33 changed files with 494 additions and 39 deletions
|
|
@ -47,7 +47,9 @@
|
|||
setContext('tags', allTags);
|
||||
|
||||
// App switcher items
|
||||
const appItems = getPillAppItems('mukke' as any);
|
||||
let appItems = $derived(
|
||||
getPillAppItems('mukke' as any, undefined, undefined, authStore.user?.tier)
|
||||
);
|
||||
|
||||
// Split-Panel Store
|
||||
const splitPanel = setSplitPanelContext('mukke' as any, DEFAULT_APPS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue