Add Direct members card to AR access side panel

What does this MR do and why?

Adds the Direct members card to the repository Manage access side panel (Step 2 of the monolith/S09 plan). The card lists who holds a direct role on the repository, before any write action lands.

  • Reads artifactRegistryRoleAssignments for the repository, 100 rows per page, with Load more. A cache merge policy appends each page, and a first-page read replaces them.
  • Renders every side panel state: loading, empty, rows, more than one page (100+ count), unavailable role, and error. It hides an assignment whose user no longer exists, the same as the project and group members pages.
  • Branches the alert on the lookup error code (extensions.code), not on the message. denied shows a permission alert with no retry. A stale cursor (invalid_request) on Load more reloads from the first page once. Any other failure shows an alert with retry.

The error codes come from #632787 (closed), which has not merged. Until it merges, every failure has no code and falls back to the generic alert with retry. This MR should merge after the error-code change.

The card ships behind the artifact_registry_repository_role_management_ui flag, so there is no changelog entry.

References

Screenshots or screen recordings

The card is new, so there is no before state. The shots come from a local GitLab instance, with the role assignments response stubbed in the browser. The error state is what every failure shows until #632787 (closed) adds the error codes.

Populated (more pages)
Direct members card with rows, the It's you badge, an unavailable role, a 3+ count, and Load more
Empty Error
Direct members card with no members Direct members card with the could not be loaded alert and Retry

How to set up and validate locally

  1. Set up Artifact Registry with IAM auth.
  2. In the Rails console, enable the feature flag:
    Feature.enable(:artifact_registry_repository_role_management_ui)
  3. As a user who can delete the repository, open an Artifact Registry repository and select Manage access from the actions menu.
  4. Check that the Direct members card lists the repository's direct role assignments above Inherited members, with an It's you badge on your own row.

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.

🤖 Generated with Claude Code

Edited by Rahul Chanila

Merge request reports

Loading
Loading