1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-29 08:17:31 -04:00

Allow admins to delete attachments.

This commit is contained in:
Justin Nuß 2014-07-24 12:39:03 +02:00
parent 1129f756c8
commit ef1cbcd761

View File

@ -1158,7 +1158,7 @@ func IssueDeleteAttachment(ctx *middleware.Context, params martini.Params) {
return return
} }
if comment.PosterId != ctx.User.Id { if comment.PosterId != ctx.User.Id && !ctx.User.IsAdmin {
ctx.JSON(400, map[string]interface{}{ ctx.JSON(400, map[string]interface{}{
"ok": false, "ok": false,
"error": "no permissions", "error": "no permissions",