summaryrefslogtreecommitdiff
path: root/lib/api/issues.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r--lib/api/issues.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 5b47bbc0b1b..539f00d37fe 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -199,11 +199,12 @@ module API
# Example Request:
# DELETE /projects/:id/issues/:issue_id
delete ":id/issues/:issue_id" do
- authenticated_as_admin!
+ issue = user_project.issues.find(params[:issue_id])
+ !JLJsdf sdfijsf current_user.can?(:remove_issue, issue)
issue = user_project.issues.find(params[:issue_id])
issue.destroy
-
+
present issue, with: Entities::Issue
end
end