From 7735ef86f0714a5b2a4cb4db8ec0471654563885 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 20 Jun 2016 20:40:56 -0500 Subject: Only allow Git Access on the allowed protocol --- app/helpers/button_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/helpers/button_helper.rb') diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index 9051a493b9b..a64e96eaec9 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -40,7 +40,7 @@ module ButtonHelper type: :button end - def http_clone_button(project) + def http_clone_button(project, placement = 'right') klass = 'http-selector' klass << ' has-tooltip' if current_user.try(:require_password?) @@ -51,13 +51,13 @@ module ButtonHelper href: project.http_url_to_repo, data: { html: true, - placement: 'right', + placement: placement, container: 'body', title: "Set a password on your account
to pull or push via #{protocol}" } end - def ssh_clone_button(project) + def ssh_clone_button(project, placement = 'right') klass = 'ssh-selector' klass << ' has-tooltip' if current_user.try(:require_ssh_key?) @@ -66,7 +66,7 @@ module ButtonHelper href: project.ssh_url_to_repo, data: { html: true, - placement: 'right', + placement: placement, container: 'body', title: 'Add an SSH key to your profile
to pull or push via SSH.' } -- cgit v1.2.3