Commit ddfafea0 authored by Dennis Tang's avatar Dennis Tang Committed by Stan Hu

Enable Code Review Analytics by default

parent 7d37748d
---
title: Enable Code Review Analytics by default
merge_request: 23285
author:
type: changed
......@@ -59,7 +59,7 @@ module EE
nav_tabs << :packages
end
if ::Feature.enabled?(:code_review_analytics, project)
if ::Feature.enabled?(:code_review_analytics, project, default_enabled: true)
nav_tabs << :code_review
end
......
- if Feature.enabled?(:code_review_analytics) && can?(current_user, :read_code_review_analytics, @project)
- if Feature.enabled?(:code_review_analytics, default_enabled: true) && can?(current_user, :read_code_review_analytics, @project)
- project_analytics_link = project_analytics_code_reviews_path(@project)
= nav_link controller: :code_review do
......
......@@ -79,7 +79,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources :audit_events, only: [:index]
namespace :analytics do
constraints(::Constraints::FeatureConstrainer.new(:code_review_analytics)) do
constraints(::Constraints::FeatureConstrainer.new(:code_review_analytics, default_enabled: true)) do
resources :code_reviews, only: [:index]
end
end
......
......@@ -29,7 +29,7 @@ module API
end
before do
not_found! unless Feature.enabled?(:code_review_analytics)
not_found! unless Feature.enabled?(:code_review_analytics, default_enabled: true)
end
resource :analytics do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment