Give the activation landing route its activated-organization states

What

S10 Step 9: the activation landing route's three outcomes for an organization that already has a mapping row, decided after the flag and read-ability gate:

State Response
Handle resolves, registry serves reads (active, suspended) Server-side redirect to the slug-scoped repositories route — for an owner and for a member holding only the read ability alike
Handle resolves, registry does not serve reads (disabled, blocked, deleted, purged, unrecognized) An informational state naming the status, with a link to the Activation settings section only for a viewer holding update_organization
Handle does not resolve (AR authorization failure, unreachable, timeout, or 404→unknown) Service-unavailable — distinct from the informational state, since an unknown status is not a status to name

It also re-tightens Step 10's owner mount to an organization with no mapping row, so an owner of an already-activated organization is redirected rather than shown the setup page. With no mapping row the route still returns not-found, byte-identical to the flag-off response.

READ_SERVING_STATUSES and Registry#serves_reads? move onto the NamespaceMapping model so the read-serving predicate has one home.

Testing

Controller request spec, 28 examples, one case per outcome, per non-read-serving status (including an unrecognized one), and per ability; plus the byte-identical no-mapping-row / flag-off comparison (CSP nonce normalized). The four new guards — the redirect/re-tightening, the serves_reads? predicate, the resolution_failed?→503 branch, and the owner-only settings link — were mutation-tested (reverted → a spec fails → restored). locale/gitlab.pot regenerated for the informational-state copy (additions only).

Branch topology

  • Branches from and targets nkannan/ar-s10-step7-repositories-route (this run's Step 7, MR !250768 (merged)).
  • Needs Step 7 from this run and Step 10 (already on master, 75d72113).

Draft until its parent lands.

References

Merge request reports

Loading
Loading