From 99f7ec8f451e3556ad3549287b078dfb358df3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Mon, 8 Jun 2020 00:55:50 +0800 Subject: [PATCH] Fix doer of rename repo (#11789) (#11794) fix #11725 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath Co-authored-by: zeripath --- routers/repo/setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/setting.go b/routers/repo/setting.go index dff13ff5b3..8622fd4698 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -76,7 +76,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { ctx.Repo.GitRepo.Close() ctx.Repo.GitRepo = nil } - if err := repo_service.ChangeRepositoryName(ctx.Repo.Owner, repo, newRepoName); err != nil { + if err := repo_service.ChangeRepositoryName(ctx.User, repo, newRepoName); err != nil { ctx.Data["Err_RepoName"] = true switch { case models.IsErrRepoAlreadyExist(err):