diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2018-03-09 12:36:26 -0300 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2018-03-09 12:36:26 -0300 |
commit | 5596933b535d632cf3c8159889a72b1e98e4ec0a (patch) | |
tree | 5edc39c0408a1e5bcbc13168dedbdabd1eba417f /app/controllers/boards | |
parent | da5694c5cbaf62d5568339efd1a6f340f97e6e53 (diff) | |
parent | 3bbe60f8e802ce3d9da060a47b7f635dedba7370 (diff) | |
download | gitlab-ce-docs-refactor-dev-guides.tar.gz |
fix conflictdocs-refactor-dev-guides
Diffstat (limited to 'app/controllers/boards')
-rw-r--r-- | app/controllers/boards/issues_controller.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/controllers/boards/issues_controller.rb b/app/controllers/boards/issues_controller.rb index 352f12a89fd..19dbee84c11 100644 --- a/app/controllers/boards/issues_controller.rb +++ b/app/controllers/boards/issues_controller.rb @@ -1,6 +1,9 @@ module Boards class IssuesController < Boards::ApplicationController include BoardsResponses + include ControllerWithCrossProjectAccessCheck + + requires_cross_project_access if: -> { board&.group_board? } before_action :whitelist_query_limiting, only: [:index, :update] before_action :authorize_read_issue, only: [:index] @@ -64,11 +67,19 @@ module Boards end def issues_finder - IssuesFinder.new(current_user, project_id: board_parent.id) + if board.group_board? + IssuesFinder.new(current_user, group_id: board_parent.id) + else + IssuesFinder.new(current_user, project_id: board_parent.id) + end end def project - board_parent + @project ||= if board.group_board? + Project.find(issue_params[:project_id]) + else + board_parent + end end def move_params |