Skip to content

Change permissions required to onboard a project with product analytics from Developer+ to Maintainer+

Problem to solve

Currently, anyone with Developer + can onboard a project with product analytics (once product analytics is enabled and configured by admin/maintainers).

This doesn't seem quite right - configuring a project like this seems like something that should be Maintainer +

Proposed solution

Check this assumption and if right change the permissions required from Developer+ to Maintainer+.

We should be able to stop returning product_analytics as an enabled feature within the dashboards_list_app_data, which will stop the UI from showing the onboarding item / set up button. We can then also restrict relevant product analytics endpoints.

Implementation plan

  • modify analytics_dashboards_list_app_data property:
    • re-purpuose can_configure_dashboards_project as can_configure_project_settings
      • logic stays the same
      • update tests and current usages of this property
  • modify onboarding_list_item.vue to use flag
    • disable Set up button if flag says false
    • add button popover Contact the GitLab administrator or project maintainer to onboard this project with product analytics. [Learn more](https://docs.gitlab.com/ee/user/product_analytics/#onboard-a-gitlab-project).
  • update analytics_dashboards/router.js when the flag is false to prevent people manually browsing to the onboarding URL
  • update init product analytics graphql endpoint for maintainer_access
  • update specs
  • update docs
Edited by Elwyn Benson