feat(store): add roles, role assignments, api tokens and invitations

Built-in roles are seeded with fixed ids and are read-only for every org.
Existing non-owner members receive the Viewer role.

Refs #6, #7, #8, #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 00:49:35 +01:00
1 parent 15932db98a
commit ee09c497de
15 files changed
+1063 -13

No files matched your search

+5
View File
@@ -13,3 +13,8 @@ SELECT * FROM orgs ORDER BY name;
-- name: DeleteOrg :execrows
DELETE FROM orgs WHERE id = $1;
-- name: UpdateOrgPolicy :one
UPDATE orgs SET require_totp = $2, require_sso = $3, updated_at = now()
WHERE id = $1
RETURNING *;