Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0e77e20

Browse files
lunnyGiteaBot
authored andcommittedApr 19, 2023
Don't list root repository on compare page if pulls not allowed (go-gitea#24183)
Fix go-gitea#24165
1 parent f134229 commit 0e77e20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎routers/web/repo/compare.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
459459
rootRepo.ID != ci.HeadRepo.ID &&
460460
rootRepo.ID != baseRepo.ID {
461461
canRead := access_model.CheckRepoUnitUser(ctx, rootRepo, ctx.Doer, unit.TypeCode)
462-
if canRead {
462+
if canRead && rootRepo.AllowsPulls() {
463463
ctx.Data["RootRepo"] = rootRepo
464464
if !fileOnly {
465465
branches, tags, err := getBranchesAndTagsForRepo(ctx, rootRepo)

0 commit comments

Comments
 (0)
Please sign in to comment.