From: Justin Nuß Date: Thu, 24 Jul 2014 10:39:03 +0000 (+0200) Subject: Allow admins to delete attachments. X-Git-Tag: v0.9.99~1928^2^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ef1cbcd761939e7730089fce9f5fbfdabe82c5bb;p=gitea.git Allow admins to delete attachments. --- diff --git a/routers/repo/issue.go b/routers/repo/issue.go index c9d3112eaa..6becb2dff7 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1158,7 +1158,7 @@ func IssueDeleteAttachment(ctx *middleware.Context, params martini.Params) { return } - if comment.PosterId != ctx.User.Id { + if comment.PosterId != ctx.User.Id && !ctx.User.IsAdmin { ctx.JSON(400, map[string]interface{}{ "ok": false, "error": "no permissions",