Browse Source

Allow admins to delete attachments.

tags/v1.2.0-rc1
Justin Nuß 11 years ago
parent
commit
ef1cbcd761
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/repo/issue.go

+ 1
- 1
routers/repo/issue.go 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",


Loading…
Cancel
Save