Skip to content

Restore Cloudflare admin workspace controls - #2022

Open
baggiiiie wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
baggiiiie:fix/cloudflare-admin-workspace-controls
Open

baggiiiie wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
baggiiiie:fix/cloudflare-admin-workspace-controls

Conversation

@baggiiiie

@baggiiiie baggiiiie commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

when hosted on cloudflare, admins are configured through ADMIN_EMAILS, which are authorized server-side. but the console gets an empty member list and treats admins as members, hiding Workspace option

this change returns the Access principal from /account/members with its role, so the console recognizes admins while Cloudflare Access remains authoritative for membership and writes.

before

Cloudflare Access admin cannot choose Workspace or manage workspace connections

after

Cloudflare Access admin can choose Workspace and manage workspace connections

Linked issue

Fixes #1958

Verification

  • bun run format:check
  • bun run lint
  • bun run typecheck
  • TURBO_TEST_CONCURRENCY=2 bun run test — 39/39 tasks passed
  • e2e — Cloudflare · an Access admin can choose Workspace for a connectionrecording

Checklist

  • Added a changeset (bun run changeset), or this change needs none.
  • Added or updated tests for the new behaviour.
  • No secrets, credentials, or private data in the diff.

@baggiiiie
baggiiiie force-pushed the fix/cloudflare-admin-workspace-controls branch 4 times, most recently from ee3a049 to ec14285 Compare September 21, 2026 15:57
@baggiiiie
baggiiiie force-pushed the fix/cloudflare-admin-workspace-controls branch 2 times, most recently from d495f32 to 69e72de Compare September 21, 2026 16:49
…dmins

The console derives the current user's role from /account/members, not
/account/me (which carries no role). The Cloudflare provider hardcoded an
empty member list, so an ADMIN_EMAILS admin was never recognized client-side
and every workspace action (Workspace owner option, Edit/Reconnect/Remove on
org connections) was hidden even though the server authorized the writes.
@baggiiiie
baggiiiie force-pushed the fix/cloudflare-admin-workspace-controls branch from 69e72de to fb76b1e Compare September 21, 2026 16:50

This branch has not been deployed

No deployments
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.

[bug] host-cloudflare: AccountProvider.me omits orgRole, so the console hides every workspace mutation from admins

1 participant