Skip to content

Display license ID retrieved from CustomersDot

What does this MR do and why?

Part of #344898 (closed)

Prior to this changes, the displayed license ID was the one from GitLab's license database table instead of the one retrieved from CustomersDot. While the right logic was supposed to be used, the global_id logic used the license's id instead of the License#license_id method as used in the graphql resolvers.

This change will fix the issue with the global id logic by overriding the id method in the resolver with a custom global id logic that uses the License#license_id method.

Screenshots or screen recordings

Note the change in the displayed ID:

before after
Screen_Shot_2022-03-03_at_2.45.39_PM Screen_Shot_2022-03-03_at_2.45.06_PM

How to set up and validate locally

  1. Open the rails console for you GitLab instance.
  2. Load the current license: license = License.current.
  3. Check the license's ID: license.id.
  4. Check the license's license ID (included in the encrypted license key): license.license_id.
  5. Check the subscription details box on /admin/subscription, the displayed ID should match the one in step 4.

MR acceptance checklist

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

Edited by Corinna Gogolok

Merge request reports

Loading