summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:09:20 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:09:20 +0000
commitb84eeb256c4a780d902faee1f99ca9a711b3214a (patch)
tree32918aadbea9210eace50efbce9afbfb8cd3ba84 /app/controllers
parent53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (diff)
downloadgitlab-ce-b84eeb256c4a780d902faee1f99ca9a711b3214a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/boards/issues_controller.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/boards/issues_controller.rb b/app/controllers/boards/issues_controller.rb
index ed2c39e3fd3..5e14339bb07 100644
--- a/app/controllers/boards/issues_controller.rb
+++ b/app/controllers/boards/issues_controller.rb
@@ -86,8 +86,12 @@ module Boards
head(:forbidden) unless can?(current_user, :admin_issue, board)
end
+ def serializer_options(issues)
+ {}
+ end
+
def render_issues(issues, metadata)
- data = { issues: serialize_as_json(issues) }
+ data = { issues: serialize_as_json(issues, opts: serializer_options(issues)) }
data.merge!(metadata)
render json: data
@@ -133,8 +137,10 @@ module Boards
IssueSerializer.new(current_user: current_user)
end
- def serialize_as_json(resource)
- serializer.represent(resource, serializer: 'board', include_full_project_path: board.group_board?)
+ def serialize_as_json(resource, opts: {})
+ opts.merge!(include_full_project_path: board.group_board?, serializer: 'board')
+
+ serializer.represent(resource, opts)
end
def whitelist_query_limiting