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
9b92f5d3
Commit
9b92f5d3
authored
Oct 13, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract scoped issue availability check to a method
parent
0912e9e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
lib/api/entities.rb
lib/api/entities.rb
+8
-11
No files found.
lib/api/entities.rb
View file @
9b92f5d3
...
...
@@ -801,21 +801,18 @@ module API
# EE-specific
# Default filtering configuration
expose
:milestone
,
using:
Entities
::
Milestone
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:assignee
,
using:
Entities
::
UserBasic
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:labels
,
using:
Entities
::
LabelBasic
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:weight
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:milestone
,
using:
Entities
::
Milestone
,
if:
->
(
board
,
_
)
{
scoped_issue_available?
(
board
)
}
expose
:assignee
,
using:
Entities
::
UserBasic
,
if:
->
(
board
,
_
)
{
scoped_issue_available?
(
board
)
}
expose
:labels
,
using:
Entities
::
LabelBasic
,
if:
->
(
board
,
_
)
{
scoped_issue_available?
(
board
)
}
expose
:weight
,
if:
->
(
board
,
_
)
{
scoped_issue_available?
(
board
)
}
expose
:lists
,
using:
Entities
::
List
do
|
board
|
board
.
lists
.
destroyable
end
def
scoped_issue_available?
(
board
)
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
end
end
class
Compare
<
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