aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/wiki.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/wiki.go')
-rw-r--r--routers/web/repo/wiki.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go
index 633458081f..bd148413de 100644
--- a/routers/web/repo/wiki.go
+++ b/routers/web/repo/wiki.go
@@ -47,7 +47,7 @@ func MustEnableWiki(ctx *context.Context) {
if log.IsTrace() {
log.Trace("Permission Denied: User %-v cannot read %-v or %-v of repo %-v\n"+
"User in repo has Permissions: %-+v",
- ctx.User,
+ ctx.Doer,
unit.TypeWiki,
unit.TypeExternalWiki,
ctx.Repo.Repository,
@@ -658,7 +658,7 @@ func NewWikiPost(ctx *context.Context) {
form.Message = ctx.Tr("repo.editor.add", form.Title)
}
- if err := wiki_service.AddWikiPage(ctx, ctx.User, ctx.Repo.Repository, wikiName, form.Content, form.Message); err != nil {
+ if err := wiki_service.AddWikiPage(ctx, ctx.Doer, ctx.Repo.Repository, wikiName, form.Content, form.Message); err != nil {
if models.IsErrWikiReservedName(err) {
ctx.Data["Err_Title"] = true
ctx.RenderWithErr(ctx.Tr("repo.wiki.reserved_page", wikiName), tplWikiNew, &form)
@@ -710,7 +710,7 @@ func EditWikiPost(ctx *context.Context) {
form.Message = ctx.Tr("repo.editor.update", form.Title)
}
- if err := wiki_service.EditWikiPage(ctx, ctx.User, ctx.Repo.Repository, oldWikiName, newWikiName, form.Content, form.Message); err != nil {
+ if err := wiki_service.EditWikiPage(ctx, ctx.Doer, ctx.Repo.Repository, oldWikiName, newWikiName, form.Content, form.Message); err != nil {
ctx.ServerError("EditWikiPage", err)
return
}
@@ -725,7 +725,7 @@ func DeleteWikiPagePost(ctx *context.Context) {
wikiName = "Home"
}
- if err := wiki_service.DeleteWikiPage(ctx, ctx.User, ctx.Repo.Repository, wikiName); err != nil {
+ if err := wiki_service.DeleteWikiPage(ctx, ctx.Doer, ctx.Repo.Repository, wikiName); err != nil {
ctx.ServerError("DeleteWikiPage", err)
return
}