Skip to content

Add a System nav item for the system admin and move All organizations there - #51

Merged
eddietejeda merged 1 commit into
mainfrom
system-menu
Oct 17, 2026
Merged

eddietejeda merged 1 commit into
mainfrom
system-menu

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

A new top-level System nav item, shown only to the system admin, leading to /system: the home for platform-level views. It holds platform totals (organizations, members, empty organizations) and the All organizations table with its create and delete controls, moved off the Organization page so that page is about one team only.

  • /system redirects non-system-admins to /; /api/system/state answers 403 to them and 401 to tokens and strangers.
  • /api/orgs gains isSystemAdmin, which the nav uses to draw the link.
  • /api/admin/state no longer includes allOrgs.

Tests: new server/tests/test_system.py (gates, totals, nav gating), /system and /api/system/state added to the read-token refusal list. All suites pass.

… there

Platform-level views get their own page, /system, instead of riding on the
Organization page as a card only one account could see. The nav draws the
System link for the system admin alone (/api/orgs now says who); the page
redirects everyone else to their dashboard, and its read, /api/system/state,
answers 403. It holds platform totals and the All organizations table with
the create and delete controls that were on /admin. /api/admin/state no
longer carries the platform list.

The fake system database learns the grouped member-count query all_orgs
runs, which no test had exercised before.
@eddietejeda
eddietejeda requested a review from a team as a code owner October 17, 2026 03:18
@eddietejeda
eddietejeda requested review from zfarrell and removed request for a team October 17, 2026 03:18
Comment thread server/server.py
return
if self._gated_on_verify(viewer, path):
return
if not self.auth.is_system_admin(viewer["email"]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Add the org_slug check that /admin has at line 2947, before the system admin check. (not blocking)

A system admin with no organization gets system.html from this route. /api/system/state then answers 409 from the shared org_slug gate at line 3035, so the page shows only an error banner. The fix is to redirect to /setup?next=... here, the same way /admin does.

@eddietejeda
eddietejeda merged commit 8bcf22c into main Oct 17, 2026
2 checks passed
@eddietejeda
eddietejeda deleted the system-menu branch October 17, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant