diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-30 21:14:40 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-30 21:28:40 +0200 |
commit | c9577711cee5f9eec699711d39196480f400a746 (patch) | |
tree | d65422af8bbb0d5d6d4362028deaaa508dc56168 /app/controllers | |
parent | b8f28628f59b38136aba5704d3feb84af3eaa567 (diff) | |
download | gitlab-ce-fix/handle-issue-move-access.tar.gz |
Handle issue move access instead of raising errorfix/handle-issue-move-access
Closes #15533
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 9face235baa..016f5dd0005 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -96,6 +96,8 @@ class Projects::IssuesController < Projects::ApplicationController if params[:move_to_project_id].to_i > 0 new_project = Project.find(params[:move_to_project_id]) + return render_404 unless issue.can_move?(current_user, new_project) + move_service = Issues::MoveService.new(project, current_user) @issue = move_service.execute(@issue, new_project) end |