diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-23 12:53:00 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-23 12:53:00 +0300 |
commit | 378a040bcb70f6ad38f2c817d68eb7df6d2f0c5f (patch) | |
tree | 2da3892ef589c0105ab0af7a2ea795d2062884de /app/controllers | |
parent | 60471a753ff145123426c9e44f82085f273ba11a (diff) | |
parent | c56448f3f63aaa286327f5a56088a4be281e1027 (diff) |
Merge branch '2633-related-issues-public-api' into 'master'
Resolve "Related Issues BE followup - Add public API"
Closes #2633
See merge request !2123
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/issue_links_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/projects/issue_links_controller.rb b/app/controllers/projects/issue_links_controller.rb index ca55b3bd956..4ce68d3d064 100644 --- a/app/controllers/projects/issue_links_controller.rb +++ b/app/controllers/projects/issue_links_controller.rb @@ -15,12 +15,9 @@ module Projects def destroy issue_link = IssueLink.find(params[:id]) + result = IssueLinks::DestroyService.new(issue_link, current_user).execute - return render_403 unless can?(current_user, :admin_issue_link, issue_link.target.project) - - IssueLinks::DestroyService.new(issue_link, current_user).execute - - render json: { issues: issues } + render json: { issues: issues }, status: result[:http_status] end private |