summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-29 18:52:28 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-29 18:52:28 -0400
commita046a31d2be4a72959ec98f1bed7dc5e29ca7126 (patch)
tree31bf3a6fa22a4490f868fbfb988a5b250a09e47e /routers/repo
parentcd084dacf1108e483461f8c99a0771ce3b402dc4 (diff)
downloadgitea-a046a31d2be4a72959ec98f1bed7dc5e29ca7126.tar.gz
gitea-a046a31d2be4a72959ec98f1bed7dc5e29ca7126.zip
UI: Confirmation box
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/setting.go3
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)