summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-05 22:02:13 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-06 21:20:17 -0500
commitc4f56a88029c1fe73bf6efb062b5f77a65282fed (patch)
tree890a869e8ce06a5438b38c8e9dca9529362cc2f4 /app/helpers
parenta475411f4380ef4d0260940206e2553da3b2f3ee (diff)
downloadgitlab-ce-c4f56a88029c1fe73bf6efb062b5f77a65282fed.tar.gz
Increase test suite around deploy tokens behavior
Also, fixes broken specs
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/deploy_tokens_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/deploy_tokens_helper.rb b/app/helpers/deploy_tokens_helper.rb
index 3ca567a2bdd..c791b4e68b3 100644
--- a/app/helpers/deploy_tokens_helper.rb
+++ b/app/helpers/deploy_tokens_helper.rb
@@ -4,4 +4,9 @@ module DeployTokensHelper
deploy_token.errors.present? ||
Rails.env.test?
end
+
+ def container_registry_enabled?
+ Gitlab.config.registry.enabled &&
+ can?(current_user, :read_container_image, @project)
+ end
end