mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 13:57:51 +01:00
bug fixed
This commit is contained in:
parent
3f2f648035
commit
0da329462e
@ -316,7 +316,7 @@ func NewConfigContext() {
|
|||||||
// load LDAP authentication configuration if present
|
// load LDAP authentication configuration if present
|
||||||
LdapAuth = Cfg.MustBool("security", "LDAP_AUTH", false)
|
LdapAuth = Cfg.MustBool("security", "LDAP_AUTH", false)
|
||||||
if LdapAuth {
|
if LdapAuth {
|
||||||
log.Debug("LDAP AUTHENTICATION activated")
|
qlog.Debug("LDAP AUTHENTICATION activated")
|
||||||
nbsrc := 0
|
nbsrc := 0
|
||||||
for _, v := range Cfg.GetSectionList() {
|
for _, v := range Cfg.GetSectionList() {
|
||||||
if matched, _ := regexp.MatchString("(?i)^LDAPSOURCE.*", v); matched {
|
if matched, _ := regexp.MatchString("(?i)^LDAPSOURCE.*", v); matched {
|
||||||
@ -329,15 +329,15 @@ func NewConfigContext() {
|
|||||||
ldapmsadsaformat := Cfg.MustValue(v, "MSADSAFORMAT", "%s")
|
ldapmsadsaformat := Cfg.MustValue(v, "MSADSAFORMAT", "%s")
|
||||||
ldap.AddSource(ldapname, ldaphost, ldapport, ldapbasedn, ldapattribute, ldapfilter, ldapmsadsaformat)
|
ldap.AddSource(ldapname, ldaphost, ldapport, ldapbasedn, ldapattribute, ldapfilter, ldapmsadsaformat)
|
||||||
nbsrc += 1
|
nbsrc += 1
|
||||||
log.Debug("%s added as LDAP source", ldapname)
|
qlog.Debug("%s added as LDAP source", ldapname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if nbsrc == 0 {
|
if nbsrc == 0 {
|
||||||
log.Debug("No valide LDAP found, LDAP AUTHENTICATION NOT activated")
|
qlog.Debug("No valide LDAP found, LDAP AUTHENTICATION NOT activated")
|
||||||
LdapAuth = false
|
LdapAuth = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Debug("LDAP AUTHENTICATION NOT activated")
|
qlog.Debug("LDAP AUTHENTICATION NOT activated")
|
||||||
}
|
}
|
||||||
|
|
||||||
PictureService = Cfg.MustValue("picture", "SERVICE")
|
PictureService = Cfg.MustValue("picture", "SERVICE")
|
||||||
|
Loading…
Reference in New Issue
Block a user