diff options
author | Unknwon <u@gogs.io> | 2015-03-17 03:21:58 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-17 03:21:58 -0400 |
commit | 33894591a6d391674e938d018801d88d0011f0b7 (patch) | |
tree | f487e0bbb63c8a808d5a0f82751e23d379d57d3f /modules/auth/admin.go | |
parent | 35c83f60266fb2178ae69db4b578dad333b6b2ea (diff) | |
download | gitea-33894591a6d391674e938d018801d88d0011f0b7.tar.gz gitea-33894591a6d391674e938d018801d88d0011f0b7.zip |
#851: Edit Account does not take into consideration password rules
Diffstat (limited to 'modules/auth/admin.go')
-rw-r--r-- | modules/auth/admin.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go index 6fec6ce73e..e6cc82cd34 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -11,15 +11,15 @@ import ( ) type AdminEditUserForm struct { - Email string `form:"email" binding:"Required;Email;MaxSize(50)"` - Passwd string `form:"password"` - Website string `form:"website" binding:"MaxSize(50)"` - Location string `form:"location" binding:"MaxSize(50)"` - Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` - Active bool `form:"active"` - Admin bool `form:"admin"` - AllowGitHook bool `form:"allow_git_hook"` - LoginType int `form:"login_type"` + Email string `binding:"Required;Email;MaxSize(50)"` + Password string `binding:"OmitEmpty;MinSize(6);MaxSize(255)"` + Website string `binding:"MaxSize(50)"` + Location string `binding:"MaxSize(50)"` + Avatar string `binding:"Required;Email;MaxSize(50)"` + Active bool + Admin bool + AllowGitHook bool + LoginType int } func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { |