diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-09-06 22:36:49 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-09-06 22:36:49 +0000 |
commit | 07c031338a5e9cdeb69bb562179ac675cfe9c960 (patch) | |
tree | ca99996ee1aa86fc1ff234d9142241d630d918df /app/helpers/projects_helper.rb | |
parent | 7aa6766cd15036dcfb5391b3fd7bffb9069ffbcf (diff) | |
parent | d6fa67824d13fc342721e996810f2838d4706fd2 (diff) | |
download | gitlab-ce-07c031338a5e9cdeb69bb562179ac675cfe9c960.tar.gz |
Merge branch '50535-display-banner-to-notify-user-if-project-is-implicitly-opted-ado' into 'master'
Displays banner to notify users ADO is implicitly enabled
Closes #50535
See merge request gitlab-org/gitlab-ce!21503
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 80b45176a62..7a9b63d8852 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -203,6 +203,14 @@ module ProjectsHelper current_user.require_extra_setup_for_git_auth? end + def show_auto_devops_implicitly_enabled_banner?(project) + cookie_key = "hide_auto_devops_implicitly_enabled_banner_#{project.id}" + + project.has_auto_devops_implicitly_enabled? && + cookies[cookie_key.to_sym].blank? && + (project.owner == current_user || project.team.maintainer?(current_user)) + end + def link_to_set_password if current_user.require_password_creation_for_git? link_to s_('SetPasswordToCloneLink|set a password'), edit_profile_password_path |