summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-12 09:06:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-12 09:06:14 +0000
commit7801d133b6c33917a3a151c7a8db5243b148a487 (patch)
tree7a8fbb7dd66875acd0adb490dc91aa91c0802987 /lib/api/entities.rb
parent60877d1bff65fa4d2b74409d343d5b7615478891 (diff)
downloadgitlab-ce-7801d133b6c33917a3a151c7a8db5243b148a487.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index e6429725757..5819b366f7f 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -489,11 +489,11 @@ module API
end
expose :developers_can_push do |repo_branch, options|
- options[:project].protected_branches.developers_can?(:push, repo_branch.name)
+ ::ProtectedBranch.developers_can?(:push, repo_branch.name, protected_refs: options[:project].protected_branches)
end
expose :developers_can_merge do |repo_branch, options|
- options[:project].protected_branches.developers_can?(:merge, repo_branch.name)
+ ::ProtectedBranch.developers_can?(:merge, repo_branch.name, protected_refs: options[:project].protected_branches)
end
expose :can_push do |repo_branch, options|