Add the artifact registry disable and enable actions

What does this MR do and why?

Fills in the actions half of the organization's Artifact Registry activation settings section: the enable action, the disable action and its typed-handle confirmation, the failure rendering, and the accessibility behaviours both carry.

  • The section renders the one action the current status permits, and none at all for a status Artifact Registry imposed for security or billing reasons (suspended, blocked, deleted, purged, or an unrecognised value), since that condition is not the organization owner's to lift.
  • Disabling opens a confirmation built on the shared ConfirmDangerModal, whose destructive action stays unavailable until the registry handle is typed. Focus moves into the dialog, is dismissible from the keyboard, and returns to the invoking control on close.
  • The section owns both mutations and reports each outcome up to the page, which renders it in a GlAlert. The alert is not wrapped in a live region of its own: GlAlert sets role="alert" for the success and danger variants used here, and role="alert" is announced on insertion.

Two deliberate omissions, both from the spec rather than oversights:

  • The confirmation omits the repository count and stored size the design shows, because no contracted endpoint returns them.
  • It says nothing about deletion. Disabling applies a service condition and retains the data, so the design's permanent-deletion date and restore copy belong to the deferred offboarding state, not here.

Both mutation documents are entirely @client, served by local Apollo resolvers, and carry no non-@client sibling selection. A mutation's root selection is the field that does not exist yet, so no sibling can print, the redactor leaves zero fields, and graphql-verify skips the document as a client query. The resolvers are stateful, so a condition mutation moves the status a later read reports. All of it is retired when the GraphQL mutations land.

Feature flag

Behind artifact_registry_ui, which is disabled by default. The settings route returns not-found with the flag off, so nothing here is reachable and the change ships dark. No changelog entry for the same reason.

References

  • Issue: #608396 (closed) (Activation settings section: identity, status, and disable/enable actions)
  • Predecessor: !249570 (merged) (the identity and status rendering this builds on)

Screenshots or screen recordings

State Image
Enabled Screenshot_2026-08-13_at_9.04.27_pm
Disable modal Screenshot_2026-08-13_at_9.04.32_pm
Disabled Screenshot_2026-08-13_at_9.04.46_pm

How to set up and validate locally

The section reads its registry through the local Apollo resolvers, so no backend or mapping row is needed.

  1. Enable the flag in the Rails console:

    Feature.enable(:artifact_registry_ui)
  2. As an owner of an organization, visit /-/organizations/<organization>/-/settings/artifact_registry.

  3. The Activation section reports the registry as enabled and offers Disable Artifact Registry. The mock's starting status is active.

  4. Click it. The confirmation's destructive action stays disabled until you type the registry handle shown in the dialog.

  5. Confirm. The section reports the registry as disabled, offers Enable Artifact Registry, and the outcome is announced in an alert above it.

  6. Click enable. The section returns to the active state with its own announcement, and the disable confirmation does not reopen.

  7. To exercise the no-action statuses, change mockRegistryStatus in ee/app/assets/javascripts/packages_and_registries/artifact_registry/graphql/mock_resolvers.js to suspended, blocked, deleted, purged, or an unrecognised string: the identity renders with no action offered.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #608396 (closed)

Edited by Rahul Chanila

Merge request reports

Loading
Loading