Skip to content

Fix 500 errors on Credentials page with Group bots

What does this MR do and why?

This change fixes the 500 errors received when a group access token exists and one navigates to Admin - Credentials page or the Admin - Credentials - Project Access Token pages after !79645 (merged)

The change here narrows the scope of project access tokens as queried by the backend to exclude group access tokens by relying on the fact that the group access token bots will have no associations to a project (only a group)

This is not a complete fix in that it does not add formal recognition or support of group access tokens yet, it only makes sure that all tokens load even if a group access token is present, instead of failing due to the lack of a project association

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Apply a premium or ultimate license on GDK
  2. Visit any Group's Settings > Access Tokens page
  3. Create a group access token (any scope/name)
  4. Navigate to Admin > Credentials page
  5. Prior to patch: HTTP 500 is returned
  6. After patch: List is loaded with group access token listed
  7. Navigate to Admin > Credentials > Project Access Tokens tab
  8. Prior to patch: HTTP 500 is returned
  9. After patch: List is loaded with only project access tokens loaded within

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Fixes #354489 (closed)

Edited by Harsh Chouraria

Merge request reports

Loading