From ba8efe354738e0f8234c2e553852e1f0c8c414f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Sun, 7 Jun 2020 23:23:13 +0800 Subject: [PATCH] Fix doer of rename repo (#11789) fix #11725 Signed-off-by: a1012112796 <1012112796@qq.com> 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 1433bedb3..635ec4133 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):