summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-06-29 15:25:04 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-07-05 16:54:22 -0500
commit29c50c53159333bdd124d4d3584ae826f49c28ad (patch)
tree4f8e56e18100c64186f0e819a5b0112effcaab27 /app/services
parentfbaabb3911c6fec25edc25bfffad94ae2a7c0e28 (diff)
downloadgitlab-ce-29c50c53159333bdd124d4d3584ae826f49c28ad.tar.gz
Default Git access protocol to `web`
Diffstat (limited to 'app/services')
-rw-r--r--app/services/commits/change_service.rb2
-rw-r--r--app/services/files/base_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb
index c578097376a..6b69cb53b2c 100644
--- a/app/services/commits/change_service.rb
+++ b/app/services/commits/change_service.rb
@@ -23,7 +23,7 @@ module Commits
private
def check_push_permissions
- allowed = ::Gitlab::GitAccess.new(current_user, project, 'web').can_push_to_branch?(@target_branch)
+ allowed = ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(@target_branch)
unless allowed
raise ValidationError.new('You are not allowed to push into this branch')
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb
index 4bdb68a3698..0326a8823e9 100644
--- a/app/services/files/base_service.rb
+++ b/app/services/files/base_service.rb
@@ -43,7 +43,7 @@ module Files
end
def validate
- allowed = ::Gitlab::GitAccess.new(current_user, project, 'web').can_push_to_branch?(@target_branch)
+ allowed = ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(@target_branch)
unless allowed
raise_error("You are not allowed to push into this branch")