mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
Some improvements
This commit is contained in:
@@ -423,6 +423,9 @@ func CreatePullRequest(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
// we just need to check the head repository's permission here because the base
|
||||
// repository's permission is already checked in api.go with
|
||||
// mustAllowPulls, reqRepoReader(unit.TypeCode)
|
||||
if !ci.IsSameRepo() {
|
||||
// user should have permission to read headrepo's codes
|
||||
permHead, err := access_model.GetUserRepoPermission(ctx, ci.HeadRepo, ctx.Doer)
|
||||
|
||||
Reference in New Issue
Block a user