Commit 499a27c8 authored by Baodong's avatar Baodong Committed by Luke Duncalfe

Turn on Feature Flag of ZenTao

Turn on the Feature Flag of Integration of ZenTao.

Changelog: changed
parent 210552b2
......@@ -9,10 +9,6 @@ module Integrations
validates :api_token, presence: true, if: :activated?
validates :zentao_product_xid, presence: true, if: :activated?
def self.feature_flag_enabled?(project)
Feature.enabled?(:zentao_issues_integration, project)
end
# License Level: EEP_FEATURES
def self.issues_license_available?(project)
project&.licensed_feature_available?(:zentao_issues_integration)
......
......@@ -1453,10 +1453,7 @@ class Project < ApplicationRecord
end
def disabled_integrations
disabled_integrations = []
disabled_integrations << :zentao unless ::Integrations::Zentao.feature_flag_enabled?(self)
disabled_integrations
[]
end
def find_or_initialize_integration(name)
......
---
name: zentao_issues_integration
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69602
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/338775
milestone: '14.4'
type: development
group: group::integrations
default_enabled: false
......@@ -34,7 +34,7 @@ module Projects
private
def query_params
params.permit(:id, :page, :limit, :search, :sort, :state, :labels)
params.permit(:id, :page, :limit, :search, :sort, :state, labels: [])
end
def query
......@@ -53,8 +53,6 @@ module Projects
end
def check_feature_enabled!
return render_404 unless ::Integrations::Zentao.feature_flag_enabled?(project)
return render_404 unless ::Integrations::Zentao.issues_license_available?(project) && project.zentao_integration&.active?
end
......
......@@ -23,7 +23,7 @@ module Sidebars
add_menu(Sidebars::Projects::Menus::RepositoryMenu.new(context))
add_menu(Sidebars::Projects::Menus::IssuesMenu.new(context))
add_menu(Sidebars::Projects::Menus::ExternalIssueTrackerMenu.new(context))
add_menu(Sidebars::Projects::Menus::ZentaoMenu.new(context)) if ::Integrations::Zentao.feature_flag_enabled?(context.project)
add_menu(Sidebars::Projects::Menus::ZentaoMenu.new(context))
add_menu(Sidebars::Projects::Menus::MergeRequestsMenu.new(context))
add_menu(Sidebars::Projects::Menus::CiCdMenu.new(context))
add_menu(Sidebars::Projects::Menus::SecurityComplianceMenu.new(context))
......
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