Files
warmbly/internal/infrastructure
Matt 11f1563e08 feat(admin): organization permission bits + limit overrides migration
Add two new admin permission bits — view_organizations (bit 20) and
manage_organizations (bit 21) — and switch the existing read-only
/admin/organizations routes off the borrowed AdminPermViewUsers bit they
were using as a placeholder. Backfill the three predefined roles
(support, ops, analyst) with view_organizations so existing role
mappings still resolve cleanly; super continues to pick up everything
via AllAdminPermissions.

Migration 000044 adds organization_limit_overrides, the table the next
commit's write path will target. Schema follows the "0 = inherit from
plan" convention from the design discussion: each numeric column
defaults to 0 and a CHECK constraint enforces non-negative values, so
reverting an override is a write of 0 (preserving the granted_by audit
trail) rather than a DELETE.

Bumping the permission count changes every role's numeric bitmask, so
update the make grant-admin role table to match — super is now
4194303, support 1086401, ops 1062960, analyst 1055233.
2026-05-28 08:47:57 +02:00
..
2026-01-29 05:59:04 +01:00
2026-05-27 16:40:23 +00:00
2026-01-17 14:11:14 +00:00
2026-05-27 16:40:23 +00:00
2026-02-10 19:30:47 +01:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00