Skip to content

Commit

Permalink
Fix bug when deleting wiki with no code write permission (go-gitea#24274
Browse files Browse the repository at this point in the history
)

Fix go-gitea#24125

Co-authored-by: Giteabot <[email protected]>
Co-authored-by: silverwind <[email protected]>
  • Loading branch information
3 people authored Apr 23, 2023
1 parent 55a600f commit 284b41f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion services/wiki/wiki.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
if err := git.Push(gitRepo.Ctx, basePath, git.PushOptions{
Remote: DefaultRemote,
Branch: fmt.Sprintf("%s:%s%s", commitHash.String(), git.BranchPrefix, DefaultBranch),
Env: repo_module.PushingEnvironment(doer, repo),
Env: repo_module.FullPushingEnvironment(
doer,
doer,
repo,
repo.Name+".wiki",
0,
),
}); err != nil {
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
return err
Expand Down

0 comments on commit 284b41f

Please sign in to comment.