mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	Revert "fix DELETE /api/v1/repos/{owner}/{repo}/issues/comments/{id}"
This reverts commit 0b0b506b74.
	
	
This commit is contained in:
		
					parent
					
						
							
								9d8249d9d6
							
						
					
				
			
			
				commit
				
					
						fc3825f6b2
					
				
			
		
					 1 changed files with 1 additions and 11 deletions
				
			
		| 
						 | 
					@ -693,17 +693,7 @@ func deleteIssueComment(ctx *context.APIContext) {
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err := comment.LoadIssue(ctx); err != nil {
 | 
						if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.IsAdmin()) {
 | 
				
			||||||
		ctx.Error(http.StatusInternalServerError, "LoadIssue", err)
 | 
					 | 
				
			||||||
		return
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if comment.Issue.RepoID != ctx.Repo.Repository.ID {
 | 
					 | 
				
			||||||
		ctx.Status(http.StatusNotFound)
 | 
					 | 
				
			||||||
		return
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
 | 
					 | 
				
			||||||
		ctx.Status(http.StatusForbidden)
 | 
							ctx.Status(http.StatusForbidden)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	} else if comment.Type != issues_model.CommentTypeComment {
 | 
						} else if comment.Type != issues_model.CommentTypeComment {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue