diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 15:00:50 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 15:22:56 +0300 |
commit | b1d5186d0a2d8ea2b594398fbcfe28acb3e8ed23 (patch) | |
tree | 5bc558fcdf7564cbaa584ddabf70cd169c66e033 /app/helpers/auto_devops_helper.rb | |
parent | 7e992b0be12da8906da04dd4c11c4ae2b01299bc (diff) |
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
Diffstat (limited to 'app/helpers/auto_devops_helper.rb')
-rw-r--r-- | app/helpers/auto_devops_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |