Skip to content

Commit a2f52f3

Browse files
GiteaBotlunnysilverwind
authored
Fix bug when deleting wiki with no code write permission (#24274) (#24295)
Backport #24274 by @lunny Fix #24125 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent 65de747 commit a2f52f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/wiki/wiki.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,13 @@ func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
366366
if err := git.Push(gitRepo.Ctx, basePath, git.PushOptions{
367367
Remote: DefaultRemote,
368368
Branch: fmt.Sprintf("%s:%s%s", commitHash.String(), git.BranchPrefix, DefaultBranch),
369-
Env: repo_module.PushingEnvironment(doer, repo),
369+
Env: repo_module.FullPushingEnvironment(
370+
doer,
371+
doer,
372+
repo,
373+
repo.Name+".wiki",
374+
0,
375+
),
370376
}); err != nil {
371377
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
372378
return err

0 commit comments

Comments
 (0)