diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-18 10:16:56 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-18 10:16:56 +0200 |
commit | 2cf7f09b1e9ccb000433374a42bd7b33b73f8116 (patch) | |
tree | 743e4ed2a6f2739541891749a6ef31bfd09e6805 /app/services/commits | |
parent | 1266e2664e7b080b440f5fc004424418284ee87b (diff) | |
download | gitlab-ce-2cf7f09b1e9ccb000433374a42bd7b33b73f8116.tar.gz |
Revert "Revert "Merge branch '18193-developers-can-merge' into 'master'
""
This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50.
See !4892.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services/commits')
-rw-r--r-- | app/services/commits/change_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb index c578097376a..ed73d8cb8c2 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::UserAccess.new(current_user, project: project).can_push_to_branch?(@target_branch) unless allowed raise ValidationError.new('You are not allowed to push into this branch') @@ -31,7 +31,7 @@ module Commits true end - + def create_target_branch(new_branch) # Temporary branch exists and contains the change commit return success if repository.find_branch(new_branch) |