Skip to content

Commit 284b41f

Browse files
lunnyGiteaBotsilverwind
authoredApr 23, 2023
Fix bug when deleting wiki with no code write permission (#24274)
Fix #24125 Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
1 parent 55a600f commit 284b41f

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
@@ -321,7 +321,13 @@ func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
321321
if err := git.Push(gitRepo.Ctx, basePath, git.PushOptions{
322322
Remote: DefaultRemote,
323323
Branch: fmt.Sprintf("%s:%s%s", commitHash.String(), git.BranchPrefix, DefaultBranch),
324-
Env: repo_module.PushingEnvironment(doer, repo),
324+
Env: repo_module.FullPushingEnvironment(
325+
doer,
326+
doer,
327+
repo,
328+
repo.Name+".wiki",
329+
0,
330+
),
325331
}); err != nil {
326332
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
327333
return err

0 commit comments

Comments
 (0)
Please sign in to comment.