diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-05 16:40:25 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-05 16:40:25 +0800 |
commit | 1652dd5068f2f3ae1851bc2321832c88af85d570 (patch) | |
tree | d8bee76f5c1016c7ee432334fe02390387b9a8e9 /modules | |
parent | 79ea34e70ebe989f1a5f8fbd71cfe3109c6f8a58 (diff) | |
download | gitea-1652dd5068f2f3ae1851bc2321832c88af85d570.tar.gz gitea-1652dd5068f2f3ae1851bc2321832c88af85d570.zip |
basic authentications
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/admin.go | 13 | ||||
-rw-r--r-- | modules/auth/auth.go | 1 | ||||
-rw-r--r-- | modules/auth/authentication.go | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go index 877af19af3..e2dc0fd218 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -15,12 +15,13 @@ import ( ) type AdminEditUserForm struct { - Email string `form:"email" binding:"Required;Email;MaxSize(50)"` - Website string `form:"website" binding:"MaxSize(50)"` - Location string `form:"location" binding:"MaxSize(50)"` - Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` - Active string `form:"active"` - Admin string `form:"admin"` + Email string `form:"email" binding:"Required;Email;MaxSize(50)"` + Website string `form:"website" binding:"MaxSize(50)"` + Location string `form:"location" binding:"MaxSize(50)"` + Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` + Active string `form:"active"` + Admin string `form:"admin"` + LoginType int `form:"login_type"` } func (f *AdminEditUserForm) Name(field string) string { diff --git a/modules/auth/auth.go b/modules/auth/auth.go index 350ef4fcbf..49ace507b7 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -25,6 +25,7 @@ type RegisterForm struct { Email string `form:"email" binding:"Required;Email;MaxSize(50)"` Password string `form:"passwd" binding:"Required;MinSize(6);MaxSize(30)"` RetypePasswd string `form:"retypepasswd"` + LoginType string `form:"logintype"` } func (f *RegisterForm) Name(field string) string { diff --git a/modules/auth/authentication.go b/modules/auth/authentication.go index 5c179f0fc0..d9c61b9d79 100644 --- a/modules/auth/authentication.go +++ b/modules/auth/authentication.go @@ -1,6 +1,7 @@ package auth type AuthenticationForm struct { + Id int64 `form:"id"` Type int `form:"type"` Name string `form:"name" binding:"MaxSize(50)"` Domain string `form:"domain"` @@ -10,4 +11,5 @@ type AuthenticationForm struct { Attributes string `form:"attributes"` Filter string `form:"filter"` MsAdSA string `form:"ms_ad_sa"` + IsActived bool `form:"is_actived"` } |