Skip to content

Fix trial callout to use the correct plan

Heinrich Lee Yu requested to merge fix-trial-callout-plan into master

What does this MR do?

namespaces.plan_id is unused and we're trying to remove it in #196862 (closed)

As part of this, we needed to:

  1. Change the trial banner to show the correct plan from gitlab_subscriptions instead of namespaces.plan_id.
  2. Fix the callout to use the correct table for finding if a user owns a namespace with a paid plan.
    1. The old method was named any_namespace_with_gold? but it was actually checking if the user is an owner of any paid namespace. So we renamed this to owns_paid_namespace?.
    2. Because this could result in the callout being shown more often, add a feature flag for the whole callout.
Edited by Heinrich Lee Yu

Merge request reports

Loading