diff options
author | Justin Nuß <justin.nuss@hmmh.de> | 2014-07-24 12:39:03 +0200 |
---|---|---|
committer | Justin Nuß <justin.nuss@hmmh.de> | 2014-07-24 12:39:03 +0200 |
commit | ef1cbcd761939e7730089fce9f5fbfdabe82c5bb (patch) | |
tree | d8f54d925093020543ff6340e0a0621449d91b31 /routers | |
parent | 1129f756c89395befc8363884e7335ef2f51aa83 (diff) | |
download | gitea-ef1cbcd761939e7730089fce9f5fbfdabe82c5bb.tar.gz gitea-ef1cbcd761939e7730089fce9f5fbfdabe82c5bb.zip |
Allow admins to delete attachments.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 2 |
1 files changed, 1 insertions, 1 deletions
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", |