From b1d5186d0a2d8ea2b594398fbcfe28acb3e8ed23 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Tue, 12 Sep 2017 14:00:50 +0200 Subject: Allow all AutoDevOps banners to be disabled Given the default in the development and production environment is false, the negation of enabling is used in the flag to signal you'd turn it off. It reads a bit awkward, but makes us have a migration less. Fixes gitlab-org/gitlab-ce#37653 --- app/helpers/auto_devops_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/auto_devops_helper.rb b/app/helpers/auto_devops_helper.rb index 4ff38f86b5f..c132daed323 100644 --- a/app/helpers/auto_devops_helper.rb +++ b/app/helpers/auto_devops_helper.rb @@ -1,6 +1,7 @@ module AutoDevopsHelper def show_auto_devops_callout?(project) - show_callout?('auto_devops_settings_dismissed') && + Feature.get(:auto_devops_banner_disabled).off? && + show_callout?('auto_devops_settings_dismissed') && can?(current_user, :admin_pipeline, project) && project.has_auto_devops_implicitly_disabled? end -- cgit v1.2.3