mirror of https://github.com/mindoc-org/mindoc.git
fix(login): judging ldap_enable logic error
review: https://github.com/mindoc-org/mindoc/pull/662#discussion_r603750715pull/662/head
parent
94c233c03a
commit
bdaeefc784
|
@ -25,6 +25,7 @@ database
|
|||
*.test
|
||||
*.prof
|
||||
.idea
|
||||
.vscode
|
||||
/conf/app.conf
|
||||
/vendor
|
||||
/runtime
|
||||
|
|
|
@ -114,8 +114,8 @@ func RunMigration() {
|
|||
|
||||
//导出数据库的表结构
|
||||
func ExportDatabaseTable() ([]string, error) {
|
||||
dbadapter,_ := web.AppConfig.String("db_adapter")
|
||||
dbdatabase,_ := web.AppConfig.String("db_database")
|
||||
dbadapter, _ := web.AppConfig.String("db_adapter")
|
||||
dbdatabase, _ := web.AppConfig.String("db_database")
|
||||
tables := make([]string, 0)
|
||||
|
||||
o := orm.NewOrm()
|
||||
|
|
|
@ -118,7 +118,7 @@ func (m *Member) TmpLogin(account string) (*Member, error) {
|
|||
|
||||
//ldapLogin 通过LDAP登陆
|
||||
func (m *Member) ldapLogin(account string, password string) (*Member, error) {
|
||||
if web.AppConfig.DefaultBool("ldap_enable", false) {
|
||||
if !web.AppConfig.DefaultBool("ldap_enable", false) {
|
||||
return m, ErrMemberAuthMethodInvalid
|
||||
}
|
||||
var err error
|
||||
|
|
Loading…
Reference in New Issue