Fix resource_tokens page in credentials

Related to #512215 (closed)

What does this MR do and why?

When a user creates a grAT and the user is deleted, it results in a nil error on the credential inventory page.

This MR fixes this issue by falling back to a Deleted user when a grAT that a deleted user created is referenced.

Screenshots or screen recordings

Before After
512215-before 512215-after

How to set up and validate locally

  1. Create a group access token
  2. Delete the user you used to create the grAT
  3. Wait for the user to be fully deleted by the ::DeleteUserWorker
  4. Navigate to /admin -> credentials -> Project and group access tokens
  5. See the Deleted user text under the Creator column of the recently created grAT

MR acceptance checklist

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

Edited by Hakeem Abdul-Razak

Merge request reports

Loading