#1625 remove auto_register and makes it default

This commit is contained in:
Unknwon 2015-09-12 20:58:51 -04:00
parent 6969c20afd
commit cd37fccdfb
10 changed files with 138 additions and 131 deletions

View file

@ -127,11 +127,10 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
}
if err := models.CreateSource(&models.LoginSource{
Type: models.LoginType(form.Type),
Name: form.Name,
IsActived: form.IsActive,
AllowAutoRegister: form.AllowAutoRegister,
Cfg: config,
Type: models.LoginType(form.Type),
Name: form.Name,
IsActived: form.IsActive,
Cfg: config,
}); err != nil {
ctx.Handle(500, "CreateSource", err)
return
@ -195,7 +194,6 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
source.Name = form.Name
source.IsActived = form.IsActive
source.AllowAutoRegister = form.AllowAutoRegister
source.Cfg = config
if err := models.UpdateSource(source); err != nil {
ctx.Handle(500, "UpdateSource", err)

View file

@ -73,6 +73,9 @@ func GlobalInit() {
if models.EnableSQLite3 {
log.Info("SQLite3 Supported")
}
if models.EnableTidb {
log.Info("TiDB Supported")
}
checkRunMode()
}