diff --git a/models/login.go b/models/login.go index 92d1a3620b..313880df53 100644 --- a/models/login.go +++ b/models/login.go @@ -77,7 +77,7 @@ type LoginSource struct { Cfg core.Conversion `xorm:"TEXT"` Created time.Time `xorm:"created"` Updated time.Time `xorm:"updated"` - AllowAutoRegisted bool `xorm:"not null default false"` + AllowAutoRegister bool `xorm:"not null default false"` } func (source *LoginSource) TypeString() string { @@ -180,7 +180,7 @@ func LoginUser(uname, passwd string) (*User, error) { } else { if !has { var sources []LoginSource - cond := &LoginSource{IsActived: true, AllowAutoRegisted: true} + cond := &LoginSource{IsActived: true, AllowAutoRegister: true} err = orm.UseBool().Find(&sources, cond) if err != nil { return nil, err diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 68fef21e8a..495acefda9 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -67,7 +67,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) { Type: form.Type, Name: form.AuthName, IsActived: true, - AllowAutoRegisted: form.AllowAutoRegister, + AllowAutoRegister: form.AllowAutoRegister, Cfg: u, } @@ -140,7 +140,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) { Name: form.AuthName, IsActived: form.IsActived, Type: form.Type, - AllowAutoRegisted: form.AllowAutoRegister, + AllowAutoRegister: form.AllowAutoRegister, Cfg: config, } diff --git a/templates/admin/auths/edit.tmpl b/templates/admin/auths/edit.tmpl index 56c4db74aa..9ebc0aa4c4 100644 --- a/templates/admin/auths/edit.tmpl +++ b/templates/admin/auths/edit.tmpl @@ -124,7 +124,7 @@