Commit ab32a054 authored by Paul Slaughter's avatar Paul Slaughter Committed by Mark Chao

BE expose has_approval_rules

parent a8e29934
...@@ -35,6 +35,10 @@ class ApprovalState ...@@ -35,6 +35,10 @@ class ApprovalState
end end
end end
def has_approval_rules?
!wrapped_approval_rules.empty?
end
def approval_rules_overwritten? def approval_rules_overwritten?
merge_request.approval_rules.any?(&:regular?) merge_request.approval_rules.any?(&:regular?)
end end
......
...@@ -378,6 +378,10 @@ module EE ...@@ -378,6 +378,10 @@ module EE
expose :approval_rules_left do |approval_state, options| expose :approval_rules_left do |approval_state, options|
approval_state.approval_rules_left.map(&:name) approval_state.approval_rules_left.map(&:name)
end end
expose :has_approval_rules do |approval_state|
approval_state.has_approval_rules?
end
end end
class LdapGroup < Grape::Entity class LdapGroup < Grape::Entity
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment