mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 09:31:53 +01:00 
			
		
		
		
	Allow admins to delete attachments.
This commit is contained in:
		
							parent
							
								
									1129f756c8
								
							
						
					
					
						commit
						ef1cbcd761
					
				| @ -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", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user