diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-03-21 23:22:21 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-03-21 23:22:21 +0100 |
commit | ae7b2ef62cdf61c990f914d776a6fdfc2bc49fa2 (patch) | |
tree | 6f0022bf04b1b566fa79b979cc9cc373cd0ebaa1 /lib/api/issues.rb | |
parent | 8d544645f0ef114586212835cf011a3e268c9ec1 (diff) | |
parent | 0305dd98b32b5a989f2b84e0810cf5ddc14abd7f (diff) | |
download | gitlab-ce-ae7b2ef62cdf61c990f914d776a6fdfc2bc49fa2.tar.gz |
Merge branch 'master' into issue_12658
# Conflicts:
# app/models/issue.rb
# app/views/projects/_home_panel.html.haml
# app/views/shared/projects/_project.html.haml
# db/schema.rb
# spec/models/project_spec.rb
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r-- | lib/api/issues.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb index fda6f841438..e5ae88eb96f 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -191,7 +191,7 @@ module API end end - # Delete a project issue (deprecated) + # Delete a project issue # # Parameters: # id (required) - The ID of a project @@ -199,7 +199,10 @@ module API # Example Request: # DELETE /projects/:id/issues/:issue_id delete ":id/issues/:issue_id" do - not_allowed! + issue = user_project.issues.find_by(id: params[:issue_id]) + + authorize!(:destroy_issue, issue) + issue.destroy end end end |