Skip to content

Display link to VSD when `groupLevelAnalyticsDashboard` is set

Ezekiel Kigbo requested to merge 388286-license-check-for-vsd-link into master

What does this MR do and why?

This is a follow-up to VSA - adding drill-up link to VSD comparison page (!112787 - merged), now that we have Update doc - VSD is only available at Ultimate ... (!113304 - merged) merged, the link to the VSD page from Value stream analytics should only be displayed if the current group and or project have the groupLevelAnalyticsDashboard license feature.

This MR:

  • adds an additional check for the groupLevelAnalyticsDashboard license to both project and group level VSA
  • renames the featureFlags state key to features to better describe its purpose (feature flags + licensed feature toggles)
  • updates jest tests

Screenshots or screen recordings

No visual changes

How to set up and validate locally

  1. Enable the group_analytics_dashboards_page feature flag

    Feature.enable(:group_analytics_dashboards_page)
  2. Ensure you're on an GitLab Ultimate plan

  3. Visit VSA for any group

  4. Visit VSA for any project

  5. The link will appear under the "Key metrics" title

  6. Apply this patch to test as GitLab Premium - the link will no longer appear

diff --git a/ee/app/models/license.rb b/ee/app/models/license.rb
index a2b7935ddae2..68f294badca0 100644
--- a/ee/app/models/license.rb
+++ b/ee/app/models/license.rb
@@ -244,7 +244,8 @@ def previous_user_count
   end
 
   def plan
-    restricted_attr(:plan).presence || STARTER_PLAN
+    # restricted_attr(:plan).presence || STARTER_PLAN
+    PREMIUM_PLAN
   end
 
   def edition

MR acceptance checklist

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

Related to #388286 (closed)

Edited by Ezekiel Kigbo

Merge request reports

Loading