fix(access-control): keep the settings page open while an organization is governed - #7890
Conversation
…n is governed Permission groups keep applying through a failing payment, but the page that edits them was hidden with the rest of the Enterprise sections — so an organization could be governed by rules nobody could see or loosen until the invoice cleared. Access Control now follows the governance reader rather than the plan gate, on the page, in the navigation, and at the management API, which had already been left behind the plan gate to match the page. Also drops a stray "Open localhost" line from the README's self-hosted quick start; the walkthrough below it already says where to look.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
- Resolve the navigation flag rather than reject it: the organization surface is shared by every page, so a failed billing read would have taken home, chat and search down with the settings sidebar - Read the regime helper everywhere instead of the governance reader, so a deployment with Access Control switched off manages nothing - Give the workspace-scoped page the same treatment as the organization one, which was still plan-gated - Read one lookup per section rather than both, since Access Control's availability never consults the plan - Refresh the navigation flag from the billing summary alongside the plan it sits next to, so the item cannot linger after billing changes
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Follow-up to #7886, which stopped a failing payment from lifting an organization's permission groups. That fix left the two halves disagreeing: the restrictions kept applying, but the Access Control page was still hidden with the rest of the Enterprise sections — so an organization could be governed by rules nobody could see or loosen until the invoice cleared.
OrganizationSettingsFeaturesgainsgovernanceActive, and Access Control reads it instead of the plan gate. It defaults to the plan gate, so every other caller keeps its current behaviour untouched.Only Access Control performs the extra lookup, so no other settings page pays for it.
Type of Change
Testing
Tested manually.
bun run lint,bun run type-check,bun run check:audits(46 audits),bun run check:api-validationandbun run docs-manifest:checkall pass; the full suite runs 52,295 tests green. New tests cover an organization that is governed without an active plan (page opens, nav lists it), one that is governed by nothing (both closed), and that no other section reads governance — each verified to fail without the change.Also removes a stray
Open http://localhost:3000line from the README's self-hosted quick start. The fuller self-hosting section below it already tells you where to look once the wizard finishes, so the line was duplicating that a few paragraphs earlier.Checklist