mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-20 02:03:52 +02:00
#697 disable captcha and new admin create user UI
This commit is contained in:
1 parent
e2d6b0116e
commit
8e0a69f86a
19 files changed
+228
-179
No files matched your search
@@ -99,6 +99,8 @@ ENABLE_REVERSE_PROXY_AUTHENTICATION = false
|
||||
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
|
||||
; Do not check minimum key size with corresponding type
|
||||
DISABLE_MINIMUM_KEY_SIZE_CHECK = false
|
||||
; Disable captcha validation for registration
|
||||
DISABLE_CAPTCHA = false
|
||||
|
||||
[webhook]
|
||||
; Hook task queue length
|
||||
|
||||
@@ -780,6 +780,7 @@ users.activated = Activated
|
||||
users.admin = Admin
|
||||
users.repos = Repos
|
||||
users.created = Created
|
||||
users.new_success = New account '%s' has been created successfully.
|
||||
users.edit = Edit
|
||||
users.auth_source = Authentication Source
|
||||
users.local = Local
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.6.11.0912 Beta"
|
||||
const APP_VER = "0.6.11.0913 Beta"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ func CreateSource(source *LoginSource) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func GetAuths() ([]*LoginSource, error) {
|
||||
func LoginSources() ([]*LoginSource, error) {
|
||||
auths := make([]*LoginSource, 0, 5)
|
||||
return auths, x.Find(&auths)
|
||||
}
|
||||
|
||||
@@ -58,12 +58,12 @@ func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
|
||||
// \/ \/
|
||||
|
||||
type RegisterForm struct {
|
||||
UserName string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(35)"`
|
||||
Email string `form:"email" binding:"Required;Email;MaxSize(254)"`
|
||||
Password string `form:"password" binding:"Required;MaxSize(255)"`
|
||||
Retype string `form:"retype"`
|
||||
LoginType string `form:"logintype"`
|
||||
LoginName string `form:"loginname"`
|
||||
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
|
||||
Email string `binding:"Required;Email;MaxSize(254)"`
|
||||
Password string `binding:"Required;MaxSize(255)"`
|
||||
Retype string
|
||||
LoginType string
|
||||
LoginName string
|
||||
}
|
||||
|
||||
func (f *RegisterForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
||||
@@ -284,7 +284,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x8f\xe3\x46\x76\x7e\xe7\xaf\x28\xcb\x71\x3c\x0e\x24\xf5\xcd\x73\x71\xdb\x9d\x58\x2d\x51\xdd\xda\xd1\xcd\xa4\x34\xe3\xf1\x60\xc0\x61\x93\x25\x89\x6e\x8a\xd4\xb0\xc8\xee\x91\x91\x87\x35\xf2\x10\x20\x8f\xc9\x22\x79\x09\x82\xe4\x21\x08\xb0\xb9\x20\x8b\xbc\xec\x6e\x90\x27\x23\xef\x33\xff\xc1\xf0\x6e\xfe\x45\xbe\x73\xaa\x28\x51\x3d\xed\x59\xef\x26\x8b\x19\xb4\xa8\xba\x9c\xaa\xfa\xea\xd4\x77\xbe\x53\xd4\xbb\x62\x68\x3f\xb2\x1d\xc1\x7f\x06\xa3\x4e\xaf\xfb\x44\x4c\xce\x7b\xae\xe8\xf6\xfa\xb6\xf5\xae\x18\xf7\xed\x96\x6b\x8b\x41\xeb\xa1\x2d\xda\xe7\xad\xe1\x99\xed\x8a\xd1\x50\xb4\x47\x8e\x63\xbb\xe3\xd1\xb0\xd3\x1b\x9e\x89\xf6\xd4\x9d\x8c\x06\x28\x1c\x76\x7b\x67\xba\xa7\xf5\xb1\x68\xad\x56\x22\xf1\x97\x52\xe4\x0b\x3f\x17\x6a\x91\x5e\x2b\x91\x26\x42\x5e\xc9\x6c\x2d\x56\xfe\x1c\x15\x51\x1e\x4b\xab\x35\x1e\x7b\xc3\xd6\xc0\x16\x27\xe2\x2c\x9d\xab\x63\xfc\x15\x67\x51\x2e\x5c\x99\x5d\x45\x81\x84\xa5\xf6\xc2\x4f\xd0\x1c\x65\xd1\x4c\xac\xd3\x42\x64\x45\x22\xe2\x34\xf0\xe3\x78\x6d\x39\xd3\xa1\x37\x75\x31\xfb\x13\x31\x8f\x72\xb4\xb6\xa3\x7c\x21\x33\x51\x0b\xe5\x55\xad\x2e\x6a\xab\x2c\x0d\x6b\x22\x45\x41\x2e\x55\x8e\x92\x50\xce\xfc\x22\x86\x2d\xa5\xdb\xb0\x05\x2c\x9d\x26\x80\xef\x96\xf5\x34\x93\xab\x54\x45\x79\x9a\xad\x9f\x59\xce\x68\x34\x11\x27\x96\xdb\x76\x7a\xe3\x89\x37\x79\x32\xa6\x66\x17\xbe\x5a\xa0\x5d\x11\x3d\xc3\x78\xc3\x62\x79\x81\xf1\xd2\x99\xd8\xf4\x8b\xa4\xd2\xab\xf6\x33\xc9\x2b\x97\xa1\x88\x12\xac\x5e\x0a\xf9\x72\x15\xa7\x28\x25\x00\x2c\xfb\xf3\x71\x7f\xe4\xd8\xde\xb8\x75\x06\x1c\xbd\xe1\x74\x00\xe3\x87\xfb\x3b\x46\x23\xa5\x8a\xef\x37\xc7\x66\x7a\xae\x3b\xbd\x61\xe4\x60\x9f\xe7\xd7\xf4\xc3\x65\x94\x98\x59\x6a\x7b\x85\x92\xd9\xdb\xcd\x11\x9a\xbb\xd6\xee\x92\xb5\xa5\x9f\x5d\x86\xe9\x35\x5b\xb3\x13\xff\x22\x96\x62\xe1\x67\xa1\x88\x23\x74\xbc\xc8\xa4\x7f\x89\xc5\xe5\x32\x51\x51\x9a\x58\xf6\xb0\x75\xda\xb7\xbd\xf3\x96\xd3\xf1\xfa\xbd\xa1\xed\x9d\x3a\x76\xeb\x21\x4c\xcd\xfc\x58\x49\x58\xc3\x2c\xe0\x08\xcf\xac\xb1\x33\x9a\x8c\xda\xa3\x3e\xaa\x16\x79\xbe\xb2\x3a\xa3\x41\xab\x37\xc4\x37\xde\xdf\x45\xaa\x72\xde\x02\x6f\xea\x50\x93\xf7\xee\x94\xed\x3f\x50\xc7\x7b\x7b\xef\xdd\xd1\xcd\xf1\xe5\xbd\x3b\xe7\x93\xc9\xd8\x1b\x8f\x9c\xc9\x07\x6a\xcf\xe2\x2f\xad\x4e\x07\x6e\x61\x6d\x2a\x60\xe0\x68\x7f\x9f\xe0\xed\x44\x8a\x17\xe0\xba\xe7\x62\x26\xfd\xbc\x00\x12\xd7\x0b\x99\x88\x24\x05\x2c\x57\x7e\x14\x53\xb5\xd5\xe9\xb9\xbc\x0c\x6a\x56\x4e\x1d\xcf\xa5\xb1\xc3\xc3\x8a\xa9\x76\x67\x48\xbe\x9d\x10\x94\xc6\xe9\x96\x69\x28\xad\x51\xb7\xcb\x00\x18\x0f\xd3\x46\x4a\xc3\xce\x68\x3a\x01\xd8\xfd\xd1\xd9\xa6\xea\x63\x71\x26\x13\x99\xf9\x39\xf6\x26\x97\x2b\x75\x8c\x92\x3f\x10\x41\x88\xbd\xc9\x17\x7b\x79\xba\x37\xc7\x21\xd9\x0b\x0a\x95\xa7\xcb\x3d\x82\x4c\x71\x83\x26\x97\x8b\x40\x66\xb9\x68\x04\xfe\x49\x9e\x15\x52\x34\xc2\x02\x86\xb0\x1f\x27\x0f\xee\xdf\xdb\x5f\xec\x2f\xf7\x95\x68\x10\xa6\x27\xcb\x35\x7d\x34\xe5\x4b\x7f\xb9\x8a\x65\x33\x48\x97\xd6\xc7\xb0\x33\xca\xc4\x2c\x4b\x97\xc2\x17\xcd\xd5\xec\xa5\x98\x45\x31\x7b\x6c\x9a\xe5\xf0\x11\xae\xc1\xd9\x12\x8f\xa3\x24\xa4\xd3\x4c\x83\x45\xb3\x28\xd0\x73\x25\xaf\xbe\x13\xa6\xb0\x42\x20\xce\xd2\x6c\x2e\x73\x91\xa7\xa6\x3f\x77\x5c\x65\xd1\x15\x35\xbe\x94\xeb\x0f\xf4\xba\xd2\x15\x1c\x46\xc5\x62\x75\x19\xa8\x83\x43\xd1\x00\x78\x64\x95\x47\x6f\xa4\x45\x6e\xbe\xc9\xa5\x68\x24\x29\xba\xa9\x1f\xd6\x0b\x2d\xcb\x4e\x54\xa1\xe8\x21\x94\xca\x6a\xdb\xce\xc4\x23\x82\x02\xdc\x55\x08\xf7\xca\x61\xac\x87\xf6\x93\x5b\x1b\x18\x8b\x18\x7e\xba\x5a\xe1\x24\xc5\xd8\xeb\x98\xce\x53\x2e\x81\x20\x2d\xca\x4f\x42\xa0\x00\xb8\x03\x8d\x1b\xed\x17\x9a\x57\xe8\x86\x21\x40\x29\xb9\x1a\xc0\x22\xb6\xa3\x62\xf9\x52\x06\x05\x00\xb6\xdc\x49\x6b\xd2\x6b\x7b\xec\xef\xe3\xd6\x04\x3e\xa7\x69\x34\x26\x88\xb1\x8b\x66\xd0\xb3\x2f\x7a\x63\xa1\x8a\x15\xc1\x5a\x1e\x34\x2e\xdb\xba\x50\x1f\x93\x89\x92\xb9\xa6\x59\x6c\x05\xb6\x24\x69\xc4\xe9\x7c\x8e\x6d\x64\x02\xa8\x8b\xc0\x4f\xc4\x85\x14\xb5\x45\xba\x94\x9a\x1f\x0d\x35\xd5\xac\x7e\x8b\x79\x9d\x38\x80\x70\xa0\x16\x38\xb1\xa1\x9f\xfb\x20\x3e\xf9\xac\xc2\xb1\xcb\xb5\x7a\x11\x33\xcb\xc2\x9b\xe6\x99\x54\xda\x12\x0a\xa3\x5c\x1e\xa1\x22\xca\xdf\x57\x44\xd9\x99\x08\x16\x29\xb1\x79\xe7\xb4\x24\x51\xee\x6b\x9d\x8f\x5c\x3a\x4a\x07\x87\xf7\x9b\xfb\xf8\x77\x70\x7c\x74\xb4\x7f\xcf\x32\xf1\x80\x5c\xda\x32\xe4\x9e\xa5\x69\x6e\x8d\x5b\xae\xfb\xb8\xc3\xb8\x74\x69\xa0\xca\xb0\x49\xbc\xae\x0b\x59\x72\xbf\x3e\x94\x34\xb3\x4c\xbe\x28\xa2\xcc\x2c\x11\x94\x13\xcd\xd6\x8d\x59\x11\xc7\x35\x9c\xe4\xfe\x86\xf7\x75\xfb\xd2\x6c\x39\x7f\xde\xd3\x5a\x1e\x85\x17\x35\x4b\x6f\x88\x20\x14\xf8\xa8\x35\xc3\x0b\x80\x62\xf8\x95\xf8\x2c\x28\xb2\x28\x47\xc4\xe8\x0d\xb1\x8f\xfd\x3e\x0e\x75\xfb\x61\x65\x4b\xde\x79\x47\xc7\x4f\x1d\x5e\x27\x23\xf1\xd0\xb6\xc7\xe2\xc9\x68\xea\x08\x5e\x61\xa7\x35\x69\x09\xb7\xd5\xb5\xdf\x79\xc7\x72\xed\xb6\x63\x4f\x3c\xf8\x22\x0c\xbc\xf3\xee\xa7\xdd\x8e\xfd\xd8\xc1\xff\x3f\xfc\xa3\x3b\xe4\x11\x45\x9e\xd2\x66\xc2\xeb\x33\xb9\x94\x1c\x28\x42\x1f\x47\x03\x34\xd2\x1b\x7a\x8e\x3d\xb0\x07\xa7\x60\x95\x4e\xeb\x89\x8b\xfe\xf7\xad\xf6\x68\xf4\xb0\Line truncated
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x8f\xe3\x46\x76\x7e\xe7\xaf\x28\xcb\x71\x3c\x0e\x24\xf5\xcd\x73\x71\xdb\x9d\x58\x2d\x51\xdd\xda\xd1\xcd\xa4\x34\xe3\xf1\x60\xc0\x61\x93\x25\x89\x6e\x8a\xd4\xb0\xc8\xee\x91\x91\x87\x35\xf2\x10\x20\x8f\xc9\x22\x79\x09\x82\xe4\x21\x08\xb0\xb9\x20\x8b\xbc\xec\x6e\x90\x27\x23\xef\x33\xff\xc1\xf0\x6e\xfe\x45\xbe\x73\xaa\x28\x51\x3d\xed\x59\xef\x26\x8b\x19\xb4\xa8\x62\xd5\xa9\x3a\x5f\x9d\xcb\x77\xaa\xf4\xae\x18\xda\x8f\x6c\x47\xf0\x9f\xc1\xa8\xd3\xeb\x3e\x11\x93\xf3\x9e\x2b\xba\xbd\xbe\x6d\xbd\x2b\xc6\x7d\xbb\xe5\xda\x62\xd0\x7a\x68\x8b\xf6\x79\x6b\x78\x66\xbb\x62\x34\x14\xed\x91\xe3\xd8\xee\x78\x34\xec\xf4\x86\x67\xa2\x3d\x75\x27\xa3\x01\x1a\x87\xdd\xde\x99\x1e\x69\x7d\x2c\x5a\xab\x95\x48\xfc\xa5\x14\xf9\xc2\xcf\x85\x5a\xa4\xd7\x4a\xa4\x89\x90\x57\x32\x5b\x8b\x95\x3f\xc7\x8b\x28\x8f\xa5\xd5\x1a\x8f\xbd\x61\x6b\x60\x8b\x13\x71\x96\xce\xd5\x31\xfe\x8a\xb3\x28\x17\xae\xcc\xae\xa2\x40\x42\x52\x7b\xe1\x27\xe8\x8e\xb6\x68\x26\xd6\x69\x21\xb2\x22\x11\x71\x1a\xf8\x71\xbc\xb6\x9c\xe9\xd0\x9b\xba\x58\xfd\x89\x98\x47\x39\x7a\xdb\x51\xbe\x90\x99\xa8\x85\xf2\xaa\x56\x17\xb5\x55\x96\x86\x35\x91\xa2\x21\x97\x2a\x47\x4b\x28\x67\x7e\x11\x43\x96\xd2\x7d\x58\x02\x54\xa7\x05\xe0\xbb\x65\x3d\xcd\xe4\x2a\x55\x51\x9e\x66\xeb\x67\x96\x33\x1a\x4d\xc4\x89\xe5\xb6\x9d\xde\x78\xe2\x4d\x9e\x8c\xa9\xdb\x85\xaf\x16\xe8\x57\x44\xcf\x30\xdf\xb0\x58\x5e\x60\xbe\x74\x26\x36\xe3\x22\xa9\xb4\xd6\x7e\x26\x59\x73\x19\x8a\x28\x81\xf6\x52\xc8\x97\xab\x38\x45\x2b\x01\x60\xd9\x9f\x8f\xfb\x23\xc7\xf6\xc6\xad\x33\xe0\xe8\x0d\xa7\x03\x08\x3f\xdc\xdf\x11\x1a\x29\x55\x7c\xbf\x38\x16\xd3\x73\xdd\xe9\x0d\x21\x07\xfb\xbc\xbe\xa6\x1f\x2e\xa3\xc4\xac\x52\xcb\x2b\x94\xcc\xde\x2e\x8e\xd0\xdc\x95\x76\x97\xa4\x2d\xfd\xec\x32\x4c\xaf\x59\x9a\x9d\xf8\x17\xb1\x14\x0b\x3f\x0b\x45\x1c\x61\xe0\x45\x26\xfd\x4b\x28\x97\xcb\x44\x45\x69\x62\xd9\xc3\xd6\x69\xdf\xf6\xce\x5b\x4e\xc7\xeb\xf7\x86\xb6\x77\xea\xd8\xad\x87\x10\x35\xf3\x63\x25\x21\x0d\xab\x80\x21\x3c\xb3\xc6\xce\x68\x32\x6a\x8f\xfa\x78\xb5\xc8\xf3\x95\xd5\x19\x0d\x5a\xbd\x21\xbe\xf1\xfe\x2e\x52\x95\xf3\x16\x78\x53\x87\xba\xbc\x77\xa7\xec\xff\x81\x3a\xde\xdb\x7b\xef\x8e\xee\x8e\x2f\xef\xdd\x39\x9f\x4c\xc6\xde\x78\xe4\x4c\x3e\x50\x7b\x16\x7f\x69\x75\x3a\x30\x0b\x6b\xf3\x02\x02\x8e\xf6\xf7\x09\xde\x4e\xa4\x58\x01\xd7\x3d\x17\x33\xe9\xe7\x05\x90\xb8\x5e\xc8\x44\x24\x29\x60\xb9\xf2\xa3\x98\x5e\x5b\x9d\x9e\xcb\x6a\x50\xb7\x72\xe9\x78\x2e\x85\x1d\x1e\x56\x44\xb5\x3b\x43\xb2\xed\x84\xa0\x34\x46\xb7\x4c\x43\x69\x8d\xba\x5d\x06\xc0\x58\x98\x16\x52\x0a\x76\x46\xd3\x09\xc0\xee\x8f\xce\x36\xaf\x3e\x16\x67\x32\x91\x99\x9f\x63\x6f\x72\xb9\x52\xc7\x68\xf9\x03\x11\x84\xd8\x9b\x7c\xb1\x97\xa7\x7b\x73\x38\xc9\x5e\x50\xa8\x3c\x5d\xee\x11\x64\x8a\x3b\x34\xb9\x5d\x04\x32\xcb\x45\x23\xf0\x4f\xf2\xac\x90\xa2\x11\x16\x10\x84\xfd\x38\x79\x70\xff\xde\xfe\x62\x7f\xb9\xaf\x44\x83\x30\x3d\x59\xae\xe9\xa3\x29\x5f\xfa\xcb\x55\x2c\x9b\x41\xba\xb4\x3e\x86\x9c\x51\x26\x66\x59\xba\x14\xbe\x68\xae\x66\x2f\xc5\x2c\x8a\xd9\x62\xd3\x2c\x87\x8d\xf0\x1b\xf8\x96\x78\x1c\x25\x21\x79\x33\x4d\x16\xcd\xa2\x40\xaf\x95\xac\xfa\x4e\x98\x42\x0a\x81\x38\x4b\xb3\xb9\xcc\x45\x9e\x9a\xf1\x3c\x70\x95\x45\x57\xd4\xf9\x52\xae\x3f\xd0\x7a\xa5\x2b\x18\x8c\x8a\xc5\xea\x32\x50\x07\x87\xa2\x01\xf0\x48\x2a\xcf\xde\x48\x8b\xdc\x7c\x93\x4b\xd1\x48\x52\x0c\x53\x3f\x6c\x14\x7a\x96\x83\xe8\x85\xa2\x87\x50\x2a\xab\x6d\x3b\x13\x8f\x02\x14\xe0\xae\x42\xb8\x57\x4e\x63\x3d\xb4\x9f\xdc\xda\xc1\x48\xc4\xf4\xd3\xd5\x0a\x9e\x14\x63\xaf\x63\xf2\xa7\x5c\x02\x41\x52\xca\x4f\x42\xa0\x00\xb8\x03\x8d\x1b\xed\x17\xba\x57\xc2\x0d\x43\x80\x56\x32\x35\x80\x45\xd1\x8e\x9a\xe5\x4b\x19\x14\x00\xd8\x72\x27\xad\x49\xaf\xed\xb1\xbd\x8f\x5b\x13\xd8\x9c\x0e\xa3\x31\x41\x8c\x5d\x34\x93\x9e\x7d\xd1\x1b\x0b\x55\xac\x08\xd6\xd2\xd1\xb8\x6d\x6b\x42\x7d\x2c\x26\x4a\xe6\x3a\xcc\x62\x2b\xb0\x25\x49\x23\x4e\xe7\x73\x6c\x23\x07\x80\xba\x08\xfc\x44\x5c\x48\x51\x5b\xa4\x4b\xa9\xe3\xa3\x09\x4d\x35\xab\xdf\xe2\xb8\x4e\x31\x80\x70\xa0\x1e\xf0\xd8\xd0\xcf\x7d\x04\x3e\xf9\xac\x12\x63\x97\x6b\xf5\x22\xe6\x28\x0b\x6b\x9a\x67\x52\x69\x49\x68\x8c\x72\x79\x84\x17\x51\xfe\xbe\xa2\x90\x9d\x89\x60\x91\x52\x34\xef\x9c\x96\x41\x94\xc7\x5a\xe7\x23\x97\x5c\xe9\xe0\xf0\x7e\x73\x1f\xff\x0e\x8e\x8f\x8e\xf6\xef\x59\x26\x1f\x90\x49\x5b\x26\xb8\x67\x69\x9a\x5b\xe3\x96\xeb\x3e\xee\x30\x2e\x5d\x9a\xa8\x32\x6d\x12\xaf\xeb\x42\x96\xb1\x5f\x3b\x25\xad\x2c\x93\x2f\x8a\x28\x33\x2a\x22\xe4\x44\xb3\x75\x63\x56\xc4\x71\x0d\x9e\xdc\xdf\xc4\x7d\xdd\xbf\x14\x5b\xae\x9f\xf7\xb4\x96\x47\xe1\x45\xcd\xd2\x1b\x22\x08\x05\x76\xb5\x66\x78\x01\x50\x4c\x7c\xa5\x78\x16\x14\x59\x94\x23\x63\xf4\x86\xd8\xc7\x7e\x1f\x4e\xdd\x7e\x58\xd9\x92\x77\xde\xd1\xf9\x53\xa7\xd7\xc9\x48\x3c\xb4\xed\xb1\x78\x32\x9a\x3a\x82\x35\xec\xb4\x26\x2d\xe1\xb6\xba\xf6\x3b\xef\x58\xae\xdd\x76\xec\x89\x07\x5b\x84\x80\x77\xde\xfd\xb4\xdb\xb1\x1f\x3b\xf8\xff\x87\x7f\x74\x87\x2c\xa2\xc8\x53\xda\x4c\x58\x7d\x26\x97\x92\x13\x45\xe8\xc3\x35\x10\x46\x7a\x43\xcf\xb1\x07\xf6\xe0\x14\x51\xa5\xd3\x7a\xe2\x62\xfc\x7d\xab\x3d\x1a\x3d\Line truncated
|
||||
|
||||
func confAppIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -299,7 +299,7 @@ func confAppIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 9815, mode: os.FileMode(420), modTime: time.Unix(1442085822, 0)}
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 9885, mode: os.FileMode(420), modTime: time.Unix(1442150798, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\xbd\xeb\x72\xdc\x48\xae\x27\xfe\x9d\x4f\xc1\xf6\x09\xff\xdd\x8e\x90\xcb\xd1\xdd\xff\xbd\x44\x87\xed\x5e\x59\x6a\x5f\xe6\x58\x96\xc6\x92\x67\x76\xd6\xe1\x60\xb3\x8a\x54\x15\xc7\x55\x64\x35\xc9\x72\x59\x73\xe2\x44\xec\x6b\xec\xeb\xed\x93\x2c\xf0\x03\x90\x17\x92\x25\xd9\x3d\x27\x76\xbf\x48\xac\x4c\xe4\x0d\x89\x44\x02\x48\x24\x32\xdf\x6e\xb3\xa2\xec\x16\xe9\xd3\xf4\x38\xdd\xe6\x55\xbd\x2e\xbb\x2e\xed\xca\xf5\xf5\xa3\x55\xd3\xf5\x65\x91\xbe\xac\x7a\xfa\xdd\x7e\xae\x16\x65\x92\xac\x9a\x4d\x49\xa0\xaf\xe8\x5f\x52\xe4\xdd\x6a\xde\xe4\x6d\x41\x09\xa7\xf6\x9d\x94\x5f\xb6\xeb\xa6\x65\xa0\x5f\xe5\x2b\x59\x95\xeb\x2d\x97\xa1\x7f\x49\x57\x2d\xeb\xac\xaa\xe9\xe7\x25\x7d\xa5\xaf\xeb\xa4\x6b\x16\x55\xbe\xce\x82\x0c\x24\x58\xfe\xcf\xe9\x8f\x75\x91\x5e\xf6\xe5\x36\x7d\xd2\x6d\xf2\xf5\xfa\x59\xde\xa1\x48\x5f\xa6\xf9\x62\xd1\xec\xea\xfe\xc9\x63\xc9\x90\xca\x9b\x5d\x6f\xb5\x9f\xef\x7a\x49\xdb\x6d\x2d\xe9\xfd\x36\x69\xcb\x65\x45\x03\x6b\x29\xe9\x9d\x7e\x26\xfb\x72\xde\x55\x3d\x77\xfa\xaf\xf2\x95\x7c\x2e\xdb\xae\x6a\xb8\x3f\x7f\x91\xaf\x64\x9b\x2f\x19\xe0\x82\xfe\x25\x7d\xb9\xd9\xae\x73\x14\xb8\xd2\xcf\x64\x9d\xd7\xcb\x9d\xc0\xbc\xd1\xcf\x64\xd1\x96\x94\x95\xd5\xe5\x9e\x52\x4f\xf0\x63\x36\x9b\x25\x3b\xc2\x67\xb6\x6d\x9b\xeb\x6a\x5d\x66\x79\x5d\x64\x1b\xc1\xd8\x7b\x4a\x4f\x35\x3d\xa5\xf4\x94\xd3\x31\x84\xb2\x20\xe4\x64\x79\xa7\xe3\xa0\x69\x21\x5c\xe5\x5d\x82\xaa\xea\x7c\x63\xa5\xf9\x33\x29\x37\x79\xb5\xe6\x09\x78\xc4\x1f\xd4\xf1\xae\xdb\x37\x98\xa6\x0b\xfd\x24\x24\x64\xfd\xcd\xb6\x04\x0e\x1e\x5d\xd1\x57\xb2\xc8\xb7\xfd\x62\x95\x73\x3f\xe5\x2b\x21\xa0\x6d\x43\xc8\x68\xda\x1b\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x23\xef\x05\x41\xe7\xc1\xcf\x64\x53\xb5\x6d\xc3\xb8\x3d\xc3\x47\x42\x43\xcf\xb8\x1e\x4a\x79\x4b\x58\x08\x6a\xe1\x9c\x4d\xb5\x6c\x05\x8d\x9c\x79\x86\x5f\x5c\x0b\xe7\x5d\x37\xed\x27\xcd\x78\xc1\x9f\x83\xa2\xd4\x09\xcd\x8d\xdb\xcf\x6b\x42\xbc\xe6\x9e\xe1\x47\x04\xd0\x25\x79\xb1\x21\x54\x6e\xf3\xba\x64\x1c\x1d\xf3\x2f\xc2\x0b\xfd\x4a\x94\x9e\xb2\xae\xec\xfb\xaa\x5e\x32\xb2\x8f\x25\x29\xbd\xd4\xa4\x24\xc8\x73\x69\x37\xcd\xce\x4d\x27\xa5\xff\x8d\x7e\xa6\x17\xf2\x53\xf2\x82\x42\xc8\x74\x25\x79\x24\x5d\x76\x5d\x96\x85\x8c\xa5\x4b\x5f\xd0\x77\xb2\xdd\xad\xd7\x84\xb5\xdf\x77\x65\xd7\x73\xa1\x0b\xfa\x4d\xe3\x97\xdf\x49\xd5\x75\xf4\x41\xc9\xaf\xf1\x91\xd0\xd4\xd5\x0b\x0c\xe6\x04\x1f\x49\xf2\xa1\x2b\xf3\x76\xb1\xfa\x98\xc8\x7f\xf4\x95\x3f\x98\xf6\x0e\x4d\x2a\x13\x92\x12\x91\xb4\x60\x0d\x24\x8b\xa6\xe0\x1f\x27\xf4\x8f\xaa\xae\xea\xae\xa7\xd5\xf6\x31\xd1\x0f\x06\x93\x2f\x99\x80\xbe\xea\x81\x05\x4d\xc4\xd2\xed\x78\x06\xd3\x17\x55\xdb\xf5\x8f\xfa\x8a\x88\xf5\xdd\xae\x4e\x78\x7c\xb4\xd2\xb2\x62\x6e\x0c\xe8\x65\x43\x28\x42\x72\x4b\xe3\x3b\xbb\xb9\xfc\xf3\x9b\xa3\xf4\x82\xb8\xd0\xb2\x2d\xf1\x4d\x7f\xa8\xc4\x4f\x29\x55\x76\x55\x9d\x3e\x9f\x25\x54\xd6\xda\x3b\xcd\xfb\x7c\x9e\x77\xa5\x47\x2e\x67\x0a\x8d\xbb\x3c\x50\x3a\xf3\x35\xf0\xb0\xae\x8f\x46\x3d\xb5\x4e\xa8\x0e\x5d\x5d\xae\x8e\xb7\xbc\xc4\x28\x9d\xd9\x1a\x0a\x5f\xac\x4b\x4e\xa7\xaa\xd2\xd7\x6f\xdf\x9e\x9f\x3e\x4f\xcb\x7a\x59\xd5\x65\xba\xaf\xfa\x55\xba\xeb\xaf\xff\x6b\xb6\x2c\xeb\xb2\x25\x2e\xb7\xa8\x52\x5a\x59\x2d\xd1\x43\x4a\xe4\x2d\x43\x9c\x25\x5d\xb7\x26\x0e\x00\x24\x5f\x5e\xbe\x49\xcf\x18\xd1\xdb\xbc\x5f\xa1\x23\xfd\x2a\xe9\x7e\x5f\x33\xa2\x5c\x83\x57\xab\x32\x05\xad\x01\xa8\xb9\x1e\xe2\x25\x2d\xb4\xaf\xb3\xa4\x6c\xdb\x8c\x18\x54\x7f\xc3\x68\xd6\x3a\x0f\x41\x4b\x75\x44\x4c\x75\xd3\xa7\xf3\x32\x45\x39\xa9\xa2\xaa\x3f\xe7\xeb\xaa\x20\x64\x7b\x84\xc4\x65\x91\x58\x34\x34\x6f\x5c\x9a\x26\xbe\xd9\x63\xa8\xf9\x82\xf8\x6b\x97\xde\x9b\xdd\x03\x43\xbb\xf7\xe8\xde\x2c\xa9\x9b\x4c\x16\x21\xb3\xbe\xa2\xea\xf2\x39\xb1\x41\x61\xcb\xad\x31\x15\x5a\x27\xd6\x15\x85\x48\x23\x08\xc6\x2d\xb3\x7a\x70\x58\x9a\x6e\xaa\x3d\x45\xa5\xb6\x2b\x84\x63\xb7\x25\xef\xe6\x57\x56\xbd\x4b\x18\x8d\x39\xb1\x09\x33\xea\x3a\xde\x6e\xd7\xd5\x42\x9a\x7e\x29\x79\x9e\xd0\x78\x0f\x55\xa4\x84\x70\x20\x14\xcb\x0b\xc8\x85\x7a\xcd\x5c\x21\x8d\xd8\x28\xca\xaf\x4a\xda\x06\x56\xbb\xa5\x30\xff\x75\xb3\x2b\xbe\xc3\x7a\xb5\x99\xf3\xcb\x35\x7d\xd7\x50\x87\x41\x1d\x0e\xc0\x37\x71\x4c\xeb\x8e\xb7\xed\xb6\xdc\x34\x3d\x23\x4e\x8b\x55\x34\x3d\xfb\x8a\x32\x69\xa4\x5d\xfe\x99\xb8\x4e\xdf\xa4\xfd\xaa\xea\x08\xc7\x6d\xb9\xe0\x8a\x89\x41\xec\x68\xc3\x94\x65\x41\xcb\x54\x96\x86\xa5\xc5\x34\x08\xa8\xcd\x8e\x56\xd3\x8a\x2a\x63\xc4\xb3\xec\x40\x55\x4e\xf5\x13\x43\xa2\x7a\xb0\xca\x69\xe5\x36\xb4\x37\xf1\x44\x9f\xe2\x43\x7f\x87\xf5\x53\xaf\xf2\xeb\x6b\xea\x55\x47\xab\xe2\x55\xba\x58\x37\xb4\xa4\xde\xbf\x7b\xd3\xf1\x82\x59\x65\xdb\xa6\xc5\x46\x4f\x59\x17\xf4\xe9\xd2\x02\x44\x33\x44\xbd\xdb\xcc\xe9\xd7\x7e\x55\x11\x1f\x04\xda\xb9\x04\xcb\x33\x94\x4a\x4d\xec\x3a\x9a\xc2\xa3\x94\x96\x30\x8d\x80\x50\x06\x02\xe0\x31\x18\xd5\x31\xf8\x35\xd1\xd8\xae\xa5\xe5\xb4\xea\xfb\xad\xb5\xfc\xea\xea\xea\x42\x9a\x76\xa9\xb7\xb5\x9d\x07\x94\x81\x39\x58\xb3\xe8\x51\xa7\x4d\x3d\x03\x91\xec\xda\xf5\x80\x7e\x68\xac\x96\x73\x00\x2f\xdc\x85\xc7\xfc\xe7\xd2\xa3\x07\x78\xee\x48\x3e\xdb\x83\x9a\x08\xc7\x2Line truncated
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\xbd\xeb\x72\xdc\x48\xae\x27\xfe\x9d\x4f\xc1\xf6\x09\xff\xdd\x8e\x90\xcb\xd1\xdd\xff\xbd\x44\x87\xed\x5e\x59\x6a\x5f\xe6\x58\x96\xc6\x92\x67\x76\xd6\xe1\x60\xb3\x8a\x54\x15\xc7\x55\x64\x35\xc9\x72\x59\x73\xe2\x44\xec\x6b\xec\xeb\xed\x93\x2c\xf0\x03\x90\x17\x92\x25\xd9\x3d\x27\x76\xbf\x48\xac\x4c\xe4\x0d\x89\x44\x02\x48\x24\x32\xdf\x6e\xb3\xa2\xec\x16\xe9\xd3\xf4\x38\xdd\xe6\x55\xbd\x2e\xbb\x2e\xed\xca\xf5\xf5\xa3\x55\xd3\xf5\x65\x91\xbe\xac\x7a\xfa\xdd\x7e\xae\x16\x65\x92\xac\x9a\x4d\x49\xa0\xaf\xe8\x5f\x52\xe4\xdd\x6a\xde\xe4\x6d\x41\x09\xa7\xf6\x9d\x94\x5f\xb6\xeb\xa6\x65\xa0\x5f\xe5\x2b\x59\x95\xeb\x2d\x97\xa1\x7f\x49\x57\x2d\xeb\xac\xaa\xe9\xe7\x25\x7d\xa5\xaf\xeb\xa4\x6b\x16\x55\xbe\xce\x82\x0c\x24\x58\xfe\xcf\xe9\x8f\x75\x91\x5e\xf6\xe5\x36\x7d\xd2\x6d\xf2\xf5\xfa\x59\xde\xa1\x48\x5f\xa6\xf9\x62\xd1\xec\xea\xfe\xc9\x63\xc9\x90\xca\x9b\x5d\x6f\xb5\x9f\xef\x7a\x49\xdb\x6d\x2d\xe9\xfd\x36\x69\xcb\x65\x45\x03\x6b\x29\xe9\x9d\x7e\x26\xfb\x72\xde\x55\x3d\x77\xfa\xaf\xf2\x95\x7c\x2e\xdb\xae\x6a\xb8\x3f\x7f\x91\xaf\x64\x9b\x2f\x19\xe0\x82\xfe\x25\x7d\xb9\xd9\xae\x73\x14\xb8\xd2\xcf\x64\x9d\xd7\xcb\x9d\xc0\xbc\xd1\xcf\x64\xd1\x96\x94\x95\xd5\xe5\x9e\x52\x4f\xf0\x63\x36\x9b\x25\x3b\xc2\x67\xb6\x6d\x9b\xeb\x6a\x5d\x66\x79\x5d\x64\x1b\xc1\xd8\x7b\x4a\x4f\x35\x3d\xa5\xf4\x94\xd3\x31\x84\xb2\x20\xe4\x64\x79\xa7\xe3\xa0\x69\x21\x5c\xe5\x5d\x82\xaa\xea\x7c\x63\xa5\xf9\x33\x29\x37\x79\xb5\xe6\x09\x78\xc4\x1f\xd4\xf1\xae\xdb\x37\x98\xa6\x0b\xfd\x24\x24\x64\xfd\xcd\xb6\x04\x0e\x1e\x5d\xd1\x57\xb2\xc8\xb7\xfd\x62\x95\x73\x3f\xe5\x2b\x21\xa0\x6d\x43\xc8\x68\xda\x1b\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x23\xef\x05\x41\xe7\xc1\xcf\x64\x53\xb5\x6d\xc3\xb8\x3d\xc3\x47\x42\x43\xcf\xb8\x1e\x4a\x79\x4b\x58\x08\x6a\xe1\x9c\x4d\xb5\x6c\x05\x8d\x9c\x79\x86\x5f\x5c\x0b\xe7\x5d\x37\xed\x27\xcd\x78\xc1\x9f\x83\xa2\xd4\x09\xcd\x8d\xdb\xcf\x6b\x42\xbc\xe6\x9e\xe1\x47\x04\xd0\x25\x79\xb1\x21\x54\x6e\xf3\xba\x64\x1c\x1d\xf3\x2f\xc2\x0b\xfd\x4a\x94\x9e\xb2\xae\xec\xfb\xaa\x5e\x32\xb2\x8f\x25\x29\xbd\xd4\xa4\x24\xc8\x73\x69\x37\xcd\xce\x4d\x27\xa5\xff\x8d\x7e\xa6\x17\xf2\x53\xf2\x82\x42\xc8\x74\x25\x79\x24\x5d\x76\x5d\x96\x85\x8c\xa5\x4b\x5f\xd0\x77\xb2\xdd\xad\xd7\x84\xb5\xdf\x77\x65\xd7\x73\xa1\x0b\xfa\x4d\xe3\x97\xdf\x49\xd5\x75\xf4\x41\xc9\xaf\xf1\x91\xd0\xd4\xd5\x0b\x0c\xe6\x04\x1f\x49\xf2\xa1\x2b\xf3\x76\xb1\xfa\x98\xc8\x7f\xf4\x95\x3f\x98\xf6\x0e\x4d\x2a\x13\x92\x12\x91\xb4\x60\x0d\x24\x8b\xa6\xe0\x1f\x27\xf4\x8f\xaa\xae\xea\xae\xa7\xd5\xf6\x31\xd1\x0f\x06\x93\x2f\x99\x80\xbe\xea\x81\x05\x4d\xc4\xd2\xed\x78\x06\xd3\x17\x55\xdb\xf5\x8f\xfa\x8a\x88\xf5\xdd\xae\x4e\x78\x7c\xb4\xd2\xb2\x62\x6e\x0c\xe8\x65\x43\x28\x42\x72\x4b\xe3\x3b\xbb\xb9\xfc\xf3\x9b\xa3\xf4\x82\xb8\xd0\xb2\x2d\xf1\x4d\x7f\xa8\xc4\x4f\x29\x55\x76\x55\x9d\x3e\x9f\x25\x54\xd6\xda\x3b\xcd\xfb\x7c\x9e\x77\xa5\x47\x2e\x67\x0a\x8d\xbb\x3c\x50\x3a\xf3\x35\xf0\xb0\xae\x8f\x46\x3d\xb5\x4e\xa8\x0e\x5d\x5d\xae\x8e\xb7\xbc\xc4\x28\x9d\xd9\x1a\x0a\x5f\xac\x4b\x4e\xa7\xaa\xd2\xd7\x6f\xdf\x9e\x9f\x3e\x4f\xcb\x7a\x59\xd5\x65\xba\xaf\xfa\x55\xba\xeb\xaf\xff\x6b\xb6\x2c\xeb\xb2\x25\x2e\xb7\xa8\x52\x5a\x59\x2d\xd1\x43\x4a\xe4\x2d\x43\x9c\x25\x5d\xb7\x26\x0e\x00\x24\x5f\x5e\xbe\x49\xcf\x18\xd1\xdb\xbc\x5f\xa1\x23\xfd\x2a\xe9\x7e\x5f\x33\xa2\x5c\x83\x57\xab\x32\x05\xad\x01\xa8\xb9\x1e\xe2\x25\x2d\xb4\xaf\xb3\xa4\x6c\xdb\x8c\x18\x54\x7f\xc3\x68\xd6\x3a\x0f\x41\x4b\x75\x44\x4c\x75\xd3\xa7\xf3\x32\x45\x39\xa9\xa2\xaa\x3f\xe7\xeb\xaa\x20\x64\x7b\x84\xc4\x65\x91\x58\x34\x34\x6f\x5c\x9a\x26\xbe\xd9\x63\xa8\xf9\x82\xf8\x6b\x97\xde\x9b\xdd\x03\x43\xbb\xf7\xe8\xde\x2c\xa9\x9b\x4c\x16\x21\xb3\xbe\xa2\xea\xf2\x39\xb1\x41\x61\xcb\xad\x31\x15\x5a\x27\xd6\x15\x85\x48\x23\x08\xc6\x2d\xb3\x7a\x70\x58\x9a\x6e\xaa\x3d\x45\xa5\xb6\x2b\x84\x63\xb7\x25\xef\xe6\x57\x56\xbd\x4b\x18\x8d\x39\xb1\x09\x33\xea\x3a\xde\x6e\xd7\xd5\x42\x9a\x7e\x29\x79\x9e\xd0\x78\x0f\x55\xa4\x84\x70\x20\x14\xcb\x0b\xc8\x85\x7a\xcd\x5c\x21\x8d\xd8\x28\xca\xaf\x4a\xda\x06\x56\xbb\xa5\x30\xff\x75\xb3\x2b\xbe\xc3\x7a\xb5\x99\xf3\xcb\x35\x7d\xd7\x50\x87\x41\x1d\x0e\xc0\x37\x71\x4c\xeb\x8e\xb7\xed\xb6\xdc\x34\x3d\x23\x4e\x8b\x55\x34\x3d\xfb\x8a\x32\x69\xa4\x5d\xfe\x99\xb8\x4e\xdf\xa4\xfd\xaa\xea\x08\xc7\x6d\xb9\xe0\x8a\x89\x41\xec\x68\xc3\x94\x65\x41\xcb\x54\x96\x86\xa5\xc5\x34\x08\xa8\xcd\x8e\x56\xd3\x8a\x2a\x63\xc4\xb3\xec\x40\x55\x4e\xf5\x13\x43\xa2\x7a\xb0\xca\x69\xe5\x36\xb4\x37\xf1\x44\x9f\xe2\x43\x7f\x87\xf5\x53\xaf\xf2\xeb\x6b\xea\x55\x47\xab\xe2\x55\xba\x58\x37\xb4\xa4\xde\xbf\x7b\xd3\xf1\x82\x59\x65\xdb\xa6\xc5\x46\x4f\x59\x17\xf4\xe9\xd2\x02\x44\x33\x44\xbd\xdb\xcc\xe9\xd7\x7e\x55\x11\x1f\x04\xda\xb9\x04\xcb\x33\x94\x4a\x4d\xec\x3a\x9a\xc2\xa3\x94\x96\x30\x8d\x80\x50\x06\x02\xe0\x31\x18\xd5\x31\xf8\x35\xd1\xd8\xae\xa5\xe5\xb4\xea\xfb\xad\xb5\xfc\xea\xea\xea\x42\x9a\x76\xa9\xb7\xb5\x9d\x07\x94\x81\x39\x58\xb3\xe8\x51\xa7\x4d\x3d\x03\x91\xec\xda\xf5\x80\x7e\x68\xac\x96\x73\x00\x2f\xdc\x85\xc7\xfc\xe7\xd2\xa3\x07\x78\xee\x48\x3e\xdb\x83\x9a\x08\xc7\x2Line truncated
|
||||
|
||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 43169, mode: os.FileMode(420), modTime: time.Unix(1442103678, 0)}
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 43237, mode: os.FileMode(420), modTime: time.Unix(1442150578, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ type ToggleOptions struct {
|
||||
|
||||
// AutoSignIn reads cookie and try to auto-login.
|
||||
func AutoSignIn(ctx *Context) (bool, error) {
|
||||
if !models.HasEngine {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
uname := ctx.GetCookie(setting.CookieUserName)
|
||||
if len(uname) == 0 {
|
||||
return false, nil
|
||||
|
||||
@@ -421,6 +421,7 @@ var Service struct {
|
||||
EnableReverseProxyAuth bool
|
||||
EnableReverseProxyAutoRegister bool
|
||||
DisableMinimumKeySizeCheck bool
|
||||
DisableCaptcha bool
|
||||
}
|
||||
|
||||
func newService() {
|
||||
@@ -434,6 +435,7 @@ func newService() {
|
||||
Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
|
||||
Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
|
||||
Service.DisableMinimumKeySizeCheck = sec.Key("DISABLE_MINIMUM_KEY_SIZE_CHECK").MustBool()
|
||||
Service.DisableCaptcha = sec.Key("DISABLE_CAPTCHA").MustBool()
|
||||
}
|
||||
|
||||
var logLevels = map[string]string{
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('embedded-opentype'),url(../fonts/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('woff'),url(../fonts/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('truetype'),url(../fonts/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beaker:before,.octicon-microscope:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gLine truncated
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('embedded-opentype'),url(../fonts/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('woff'),url(../fonts/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('truetype'),url(../fonts/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beaker:before,.octicon-microscope:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gLine truncated
|
||||
+34
-10
@@ -147,11 +147,20 @@ function initInstall() {
|
||||
|
||||
// Database type change detection.
|
||||
$("#db_type").change(function () {
|
||||
var sqlite_default = 'data/gogs.db';
|
||||
var tidb_default = 'data/gogs_tidb';
|
||||
|
||||
var db_type = $(this).val();
|
||||
if (db_type === "SQLite3" || db_type === "TiDB") {
|
||||
$('#sql_settings').hide();
|
||||
$('#pgsql_settings').hide();
|
||||
$('#sqlite_settings').show();
|
||||
|
||||
if (db_type === "SQLite3" && $('#db_path').val() == tidb_default) {
|
||||
$('#db_path').val(sqlite_default);
|
||||
} else if (db_type === "TiDB" && $('#db_path').val() == sqlite_default) {
|
||||
$('#db_path').val(tidb_default);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,31 +457,46 @@ function initAdmin() {
|
||||
return;
|
||||
}
|
||||
|
||||
// New user
|
||||
if ($('.admin.new.user').length > 0) {
|
||||
$('#login_type').change(function () {
|
||||
if ($(this).val().substring(0, 1) == '0') {
|
||||
$('#login_name').removeAttr('required');
|
||||
$('#password').attr('required', 'required');
|
||||
$('.non-local').hide();
|
||||
$('.local').show();
|
||||
$('#user_name').focus();
|
||||
} else {
|
||||
$('#login_name').attr('required', 'required');
|
||||
$('#password').removeAttr('required');
|
||||
$('.non-local').show();
|
||||
$('.local').hide();
|
||||
$('#login_name').focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// New authentication
|
||||
if ($('.admin.new.authentication').length > 0) {
|
||||
$('#auth_type').change(function () {
|
||||
$('.ldap').hide();
|
||||
$('.dldap').hide();
|
||||
$('.smtp').hide();
|
||||
$('.pam').hide();
|
||||
|
||||
var auth_type = $(this).val();
|
||||
switch (auth_type) {
|
||||
case '2': // LDAP
|
||||
$('.dldap').hide();
|
||||
$('.smtp').hide();
|
||||
$('.pam').hide();
|
||||
$('.ldap').show();
|
||||
break;
|
||||
case '3': // SMTP
|
||||
$('.ldap').hide();
|
||||
$('.pam').hide();
|
||||
$('.smtp').show();
|
||||
break;
|
||||
case '4': // PAM
|
||||
$('.ldap').hide();
|
||||
$('.smtp').hide();
|
||||
$('.pam').show();
|
||||
break;
|
||||
case '5': // LDAP
|
||||
$('.ldap').hide();
|
||||
$('.smtp').hide();
|
||||
$('.pam').hide();
|
||||
$('.dldap').show();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.signup {
|
||||
@input-padding: 200px!important;
|
||||
#create-page-form;
|
||||
form {
|
||||
width: 700px!important;
|
||||
.header {
|
||||
padding-left: @input-padding+30px;
|
||||
}
|
||||
.inline.field > label {
|
||||
width: @input-padding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.repository {
|
||||
&.new.repo,
|
||||
&.new.migrate,
|
||||
|
||||
@@ -31,4 +31,9 @@
|
||||
a {
|
||||
color: #d9453d;
|
||||
}
|
||||
}
|
||||
|
||||
.signup {
|
||||
padding-top: 15px;
|
||||
padding-bottom: @footer-margin * 2;
|
||||
}
|
||||
@@ -29,9 +29,9 @@ func Authentications(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsAdminAuthentications"] = true
|
||||
|
||||
var err error
|
||||
ctx.Data["Sources"], err = models.GetAuths()
|
||||
ctx.Data["Sources"], err = models.LoginSources()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetAuths", err)
|
||||
ctx.Handle(500, "LoginSources", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/middleware"
|
||||
@@ -14,6 +16,23 @@ const (
|
||||
REPOS base.TplName = "admin/repo/list"
|
||||
)
|
||||
|
||||
func pagination(ctx *middleware.Context, count int64, pageNum int) int {
|
||||
p := ctx.QueryInt("p")
|
||||
if p < 1 {
|
||||
p = 1
|
||||
}
|
||||
curCount := int64((p-1)*pageNum + pageNum)
|
||||
if curCount >= count {
|
||||
p = int(math.Ceil(float64(count) / float64(pageNum)))
|
||||
} else {
|
||||
ctx.Data["NextPageNum"] = p + 1
|
||||
}
|
||||
if p > 1 {
|
||||
ctx.Data["LastPageNum"] = p - 1
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func Repositories(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("admin.repositories")
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
|
||||
+23
-36
@@ -5,7 +5,6 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
@@ -25,23 +24,6 @@ const (
|
||||
USER_EDIT base.TplName = "admin/user/edit"
|
||||
)
|
||||
|
||||
func pagination(ctx *middleware.Context, count int64, pageNum int) int {
|
||||
p := ctx.QueryInt("p")
|
||||
if p < 1 {
|
||||
p = 1
|
||||
}
|
||||
curCount := int64((p-1)*pageNum + pageNum)
|
||||
if curCount >= count {
|
||||
p = int(math.Ceil(float64(count) / float64(pageNum)))
|
||||
} else {
|
||||
ctx.Data["NextPageNum"] = p + 1
|
||||
}
|
||||
if p > 1 {
|
||||
ctx.Data["LastPageNum"] = p - 1
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func Users(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("admin.users")
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
@@ -70,12 +52,14 @@ func NewUser(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
ctx.Data["PageIsAdminUsers"] = true
|
||||
|
||||
auths, err := models.GetAuths()
|
||||
ctx.Data["login_type"] = "0-0"
|
||||
|
||||
sources, err := models.LoginSources()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetAuths", err)
|
||||
ctx.Handle(500, "LoginSources", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["LoginSources"] = auths
|
||||
ctx.Data["Sources"] = sources
|
||||
ctx.HTML(200, USER_NEW)
|
||||
}
|
||||
|
||||
@@ -84,14 +68,15 @@ func NewUserPost(ctx *middleware.Context, form auth.RegisterForm) {
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
ctx.Data["PageIsAdminUsers"] = true
|
||||
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(200, USER_NEW)
|
||||
sources, err := models.LoginSources()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "LoginSources", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Sources"] = sources
|
||||
|
||||
if form.Password != form.Retype {
|
||||
ctx.Data["Err_Password"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), USER_NEW, &form)
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(200, USER_NEW)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -104,12 +89,12 @@ func NewUserPost(ctx *middleware.Context, form auth.RegisterForm) {
|
||||
}
|
||||
|
||||
if len(form.LoginType) > 0 {
|
||||
// NOTE: need rewrite.
|
||||
fields := strings.Split(form.LoginType, "-")
|
||||
tp, _ := com.StrTo(fields[0]).Int()
|
||||
u.LoginType = models.LoginType(tp)
|
||||
u.LoginSource, _ = com.StrTo(fields[1]).Int64()
|
||||
u.LoginName = form.LoginName
|
||||
if len(fields) == 2 {
|
||||
u.LoginType = models.LoginType(com.StrTo(fields[0]).MustInt())
|
||||
u.LoginSource = com.StrTo(fields[1]).MustInt64()
|
||||
u.LoginName = form.LoginName
|
||||
}
|
||||
}
|
||||
|
||||
if err := models.CreateUser(u); err != nil {
|
||||
@@ -132,7 +117,9 @@ func NewUserPost(ctx *middleware.Context, form auth.RegisterForm) {
|
||||
return
|
||||
}
|
||||
log.Trace("Account created by admin(%s): %s", ctx.User.Name, u.Name)
|
||||
ctx.Redirect(setting.AppSubUrl + "/admin/users")
|
||||
|
||||
ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name))
|
||||
ctx.Redirect(setting.AppSubUrl + "/admin/users/" + com.ToStr(u.Id))
|
||||
}
|
||||
|
||||
func EditUser(ctx *middleware.Context) {
|
||||
@@ -151,14 +138,14 @@ func EditUser(ctx *middleware.Context) {
|
||||
ctx.Handle(500, "GetUserByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["User"] = u
|
||||
auths, err := models.GetAuths()
|
||||
|
||||
sources, err := models.LoginSources()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetAuths", err)
|
||||
ctx.Handle(500, "LoginSources", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["LoginSources"] = auths
|
||||
ctx.Data["LoginSources"] = sources
|
||||
ctx.HTML(200, USER_EDIT)
|
||||
}
|
||||
|
||||
|
||||
+8
-22
@@ -151,6 +151,8 @@ func oauthSignUp(ctx *middleware.Context, sid int64) {
|
||||
func SignUp(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("sign_up")
|
||||
|
||||
ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha
|
||||
|
||||
if setting.Service.DisableRegistration {
|
||||
ctx.Data["DisableRegistration"] = true
|
||||
ctx.HTML(200, SIGNUP)
|
||||
@@ -168,6 +170,8 @@ func SignUp(ctx *middleware.Context) {
|
||||
func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.RegisterForm) {
|
||||
ctx.Data["Title"] = ctx.Tr("sign_up")
|
||||
|
||||
ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha
|
||||
|
||||
if setting.Service.DisableRegistration {
|
||||
ctx.Error(403)
|
||||
return
|
||||
@@ -179,36 +183,18 @@ func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.Registe
|
||||
ctx.Data["IsSocialLogin"] = true
|
||||
}
|
||||
|
||||
// May redirect from home page.
|
||||
if ctx.Query("from") == "home" {
|
||||
// Clear input error box.
|
||||
ctx.Data["Err_UserName"] = false
|
||||
ctx.Data["Err_Email"] = false
|
||||
|
||||
// Make the best guess.
|
||||
uname := ctx.Query("uname")
|
||||
i := strings.Index(uname, "@")
|
||||
if i > -1 {
|
||||
ctx.Data["email"] = uname
|
||||
ctx.Data["uname"] = uname[:i]
|
||||
} else {
|
||||
ctx.Data["uname"] = uname
|
||||
}
|
||||
ctx.Data["password"] = ctx.Query("password")
|
||||
ctx.HTML(200, SIGNUP)
|
||||
return
|
||||
}
|
||||
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(200, SIGNUP)
|
||||
return
|
||||
}
|
||||
|
||||
if !cpt.VerifyReq(ctx.Req) {
|
||||
if !setting.Service.DisableCaptcha && !cpt.VerifyReq(ctx.Req) {
|
||||
ctx.Data["Err_Captcha"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), SIGNUP, &form)
|
||||
return
|
||||
} else if form.Password != form.Retype {
|
||||
}
|
||||
|
||||
if form.Password != form.Retype {
|
||||
ctx.Data["Err_Password"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), SIGNUP, &form)
|
||||
return
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.6.11.0912 Beta
|
||||
0.6.11.0913 Beta
|
||||
@@ -1,58 +1,56 @@
|
||||
{{template "ng/base/head" .}}
|
||||
{{template "ng/base/header" .}}
|
||||
<div id="admin-wrapper">
|
||||
<div id="setting-wrapper" class="main-wrapper">
|
||||
<div id="admin-setting" class="container clear">
|
||||
{{template "admin/nav" .}}
|
||||
<div class="grid-4-5 left">
|
||||
<div class="setting-content">
|
||||
{{template "ng/base/alert" .}}
|
||||
<div id="setting-content">
|
||||
<div class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "admin.users.new_account"}}</strong>
|
||||
</div>
|
||||
<form class="form form-align panel-body" id="repo-setting-form" action="{{AppSubUrl}}/admin/users/new" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<select id="login-type" name="logintype">
|
||||
<option value="0-0">{{.i18n.Tr "admin.users.local"}}</option>
|
||||
{{range $key, $val := .LoginSources}}
|
||||
<option value="{{$val.Type}}-{{$val.ID}}">{{$val.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="field auth-name hidden">
|
||||
<label class="req" for="loginname">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_LoginName}}ipt-error{{end}}" id="loginname" name="loginname" value="{{.loginname}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="username">{{.i18n.Tr "username"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}" required/>
|
||||
</div>
|
||||
<div class="field pwd">
|
||||
<label class="req" for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" value="{{.password}}" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="re-type">{{.i18n.Tr "re_type"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="re-type" name="retype" type="password" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
<button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "admin.users.new_account"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/head" .}}
|
||||
<div class="admin new user">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.new_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}-{{.login_id}}" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "ng/base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
@@ -1,49 +1,56 @@
|
||||
{{template "ng/base/head" .}}
|
||||
{{template "ng/base/header" .}}
|
||||
<div id="sign-wrapper">
|
||||
<form class="form-align form panel panel-radius sign-panel sign-form container" id="sign-up-form" action="{{AppSubUrl}}/user/sign_up" method="post">
|
||||
<div class="panel-header">
|
||||
<h2>{{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}}</h2>
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
{{template "ng/base/alert" .}}
|
||||
{{template "base/head" .}}
|
||||
<div class="signup">
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
{{if .DisableRegistration}}
|
||||
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
|
||||
{{else}}
|
||||
<div class="field">
|
||||
<label class="req" for="username">{{.i18n.Tr "username"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" value="{{.password}}" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="re-type">{{.i18n.Tr "re_type"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="re-type" name="retype" type="password" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
{{.Captcha.CreateHtml}}
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="captcha">{{.i18n.Tr "captcha"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Captcha}}ipt-error{{end}}" id="captcha" name="captcha" type="text" required/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="form-label"></span>
|
||||
<button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "auth.create_new_account"}}</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="form-label"></span>
|
||||
<a href="{{AppSubUrl}}/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" required>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Password}}error{{end}}">
|
||||
<label for="retype">{{.i18n.Tr "re_type"}}</label>
|
||||
<input id="retype" name="retype" type="password" value="{{.retype}}" required>
|
||||
</div>
|
||||
{{if not .DisableCaptcha}}
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
{{.Captcha.CreateHtml}}
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Captcha}}error{{end}}">
|
||||
<label for="captcha">{{.i18n.Tr "captcha"}}</label>
|
||||
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">{{.i18n.Tr "auth.create_new_account"}}</button>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<a href="{{AppSubUrl}}/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "ng/base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
Reference in new issue
Block a user