1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Allow maintainers to view and edit files of private repos when "Allow maintainers to edit" is enabled (#32215)

Fix #31539
This commit is contained in:
Zettat123
2024-10-12 03:08:19 +08:00
committed by GitHub
parent aebb741c08
commit 0fe5e2b08c
4 changed files with 90 additions and 3 deletions

View File

@@ -887,8 +887,6 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
}
if pull.HeadRepo != nil {
ctx.Data["SourcePath"] = pull.HeadRepo.Link() + "/src/commit/" + endCommitID
if !pull.HasMerged && ctx.Doer != nil {
perm, err := access_model.GetUserRepoPermission(ctx, pull.HeadRepo, ctx.Doer)
if err != nil {