Product analytics project-level settings remain visible when disabled on an instance
Problem to solve
The settings section in Project > Settings > Product Analytics remains visible even if an administrator has disabled Product Analytics on an instance.
Steps to reproduce
- Enable the product analytics feature flag
- Disable product analytics at Admin > Settings > Product Analytics.
- View the settings at Project > Settings > Product Analytics.
Proposed solution
I think we could solve this in one of two ways:
- Similar to "Product Analytics" project settings visible to... (#412836 - closed) we hide the section if the instance has Product Analytics disabled.
- We conditionally display a message that the feature is disabled on an instance.
Screenshot for the latter
Implementation plan
backend
- Update the project settings HAML file to not render anything unless the instance setting is enabled.
- Update or add specs.
Note: If needed we can follow-up with the second proposal based on feedback.
Edited by Jiaan Louw