A4A Amplify: gate section behind per-agency flag#112274
Merged
Merged
Conversation
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
tiagonoronha
marked this pull request as ready for review
July 3, 2026 14:47
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
Register the Amplify routes in production so the per-agency amplify.allowed flag and route guard become the sole access control, matching the learn/MCP rollout pattern. Claude-Session: https://claude.ai/code/session_015tcJJ9oJLARb3K3XQnf28s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Gate the A4A Amplify section behind a per-agency
amplify.allowedflag instead of the globala8c-for-agencies-amplifysection flag.amplify?: { allowed: boolean }field to theAgencytype, mirroring the existingmcpflag.agency.amplify.allowedis set.requireAmplifyAccessContextroute guard that redirects to the A4A overview when the active agency lacks access, and wire it into both the Amplify overview and reports routes.a8c-for-agencies-amplifysection flag totruein production so the Amplify routes register there and the per-agencyamplify.allowedflag becomes the sole access control, matching thelearn/MCP rollout pattern.Companion PR:
226450-ghe-Automattic/wpcom(adds theamplify.allowedflag to the agency payload).Why are these changes being made?
Amplify access should be controlled per agency rather than being all-or-nothing via a global section flag, so the backend can grant it selectively.
Testing Instructions
226450-ghe-Automattic/wpcomis applied to your sandbox (it must be merged or applied to the sandbox for the flag to be returned).amplify.allowed: confirm the Amplify item appears in the sidebar and that both the Amplify overview and reports pages load.amplify.allowed: confirm the Amplify sidebar item is hidden and that visiting the Amplify overview/reports URLs directly redirects to the A4A overview.Pre-merge Checklist