diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 17ea3a441c..48089787fe 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -112,6 +112,9 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { } else if !isExist { ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), SETTINGS_OPTIONS, nil) return + } else if !ctx.User.ValidtePassword(ctx.Query("password")) { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), SETTINGS_OPTIONS, nil) + return } else if err = models.TransferOwnership(ctx.User, newOwner, ctx.Repo.Repository); err != nil { if err == models.ErrRepoAlreadyExist { ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), SETTINGS_OPTIONS, nil) |