Skip to content

Use plan ID to filter namespace eligibility for purchase

Josianne Hyson requested to merge jh-eligible_add_on_packs into master

What does this MR do?

Addresses part of: #326663 (closed)

This is a follow up to the corresponding MR in the customers application: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/3602

Currently, the CI minutes purchase flow re-uses the eligibility criteria for making a new license purchase. This is filtering out namespaces that have a Premium/Ultimate subscription as they are not eligible for a new license subscription, but they are still eligible to purchase new CI minute packs.

This MR updates the subscriptions controller to fetch the CI minutes plan ID and then supply that to the eligibility criteria API.

Note: currently there is a duplicated call on the frontend to fetch the CI minutes plan ID. I will raise a follow up issue to supply this information directly from the backend, rather than making the call twice.

📸 Screenshots or Screencasts

SCENARIO BEFORE AFTER
Group without any subscriptions BEFORE-no_subscription AFTER-no_subscription
Group with active license subscription BEFORE-with_subscription AFTER-with_subscription
Group with active CI minute subscription BEFORE-with_ci_minutes AFTER-with_ci_mintes

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • ~~Label as security and @ mention @gitlab-com/gl-security/appsec~~
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Josianne Hyson

Merge request reports