forked from forgejo/forgejo
Fix comment permissions (#28213)
This PR will fix some missed checks for private repositories' data on web routes and API routes.
This commit is contained in:
parent
80217cacfc
commit
882e502327
34 changed files with 417 additions and 105 deletions
|
@ -122,7 +122,7 @@ func GetContentHistoryDetail(ctx *context.Context) {
|
|||
}
|
||||
|
||||
historyID := ctx.FormInt64("history_id")
|
||||
history, prevHistory, err := issues_model.GetIssueContentHistoryAndPrev(ctx, historyID)
|
||||
history, prevHistory, err := issues_model.GetIssueContentHistoryAndPrev(ctx, issue.ID, historyID)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusNotFound, map[string]any{
|
||||
"message": "Can not find the content history",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue