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
d8018047
Commit
d8018047
authored
Feb 01, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard new API with feature flag
parent
5cfe33c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
ee/lib/api/merge_request_approvals.rb
ee/lib/api/merge_request_approvals.rb
+2
-0
ee/lib/api/project_approval_rules.rb
ee/lib/api/project_approval_rules.rb
+1
-0
No files found.
ee/lib/api/merge_request_approvals.rb
View file @
d8018047
...
...
@@ -54,6 +54,8 @@ module API
hidden:
true
}
get
'approval_settings'
do
not_found!
unless
::
Feature
.
enabled?
(
:approval_rules
,
user_project
)
merge_request
=
find_merge_request_with_access
(
params
[
:merge_request_iid
])
present
merge_request
.
approval_state
,
with:
::
EE
::
API
::
Entities
::
MergeRequestApprovalRules
,
current_user:
current_user
...
...
ee/lib/api/project_approval_rules.rb
View file @
d8018047
...
...
@@ -3,6 +3,7 @@
module
API
class
ProjectApprovalRules
<
::
Grape
::
API
before
{
authenticate!
}
before
{
not_found!
unless
::
Feature
.
enabled?
(
:approval_rules
,
user_project
)
}
ARRAY_COERCION_LAMBDA
=
->
(
val
)
{
val
.
empty?
?
[]
:
Array
.
wrap
(
val
)
}
...
...
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