镜像自地址
https://github.com/go-gitea/gitea
已同步 2025-12-07 13:28:25 +00:00
Add permission check when creating PR (#31033)
user should be a collaborator of the base repo to create a PR
这个提交包含在:
@@ -535,6 +535,8 @@ func CreatePullRequest(ctx *context.APIContext) {
|
||||
ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err)
|
||||
} else if errors.Is(err, user_model.ErrBlockedUser) {
|
||||
ctx.Error(http.StatusForbidden, "BlockedUser", err)
|
||||
} else if errors.Is(err, issues_model.ErrMustCollaborator) {
|
||||
ctx.Error(http.StatusForbidden, "MustCollaborator", err)
|
||||
} else {
|
||||
ctx.Error(http.StatusInternalServerError, "NewPullRequest", err)
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户