Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ab32a054
Commit
ab32a054
authored
Feb 03, 2019
by
Paul Slaughter
Committed by
Mark Chao
Feb 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BE expose has_approval_rules
parent
a8e29934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
ee/app/models/approval_state.rb
ee/app/models/approval_state.rb
+4
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+4
-0
No files found.
ee/app/models/approval_state.rb
View file @
ab32a054
...
...
@@ -35,6 +35,10 @@ class ApprovalState
end
end
def
has_approval_rules?
!
wrapped_approval_rules
.
empty?
end
def
approval_rules_overwritten?
merge_request
.
approval_rules
.
any?
(
&
:regular?
)
end
...
...
ee/lib/ee/api/entities.rb
View file @
ab32a054
...
...
@@ -378,6 +378,10 @@ module EE
expose
:approval_rules_left
do
|
approval_state
,
options
|
approval_state
.
approval_rules_left
.
map
(
&
:name
)
end
expose
:has_approval_rules
do
|
approval_state
|
approval_state
.
has_approval_rules?
end
end
class
LdapGroup
<
Grape
::
Entity
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment