MM-50443 - LdapSettings.SyncEnabled error message (#22314)
* Added ldap disabled message * Changed style per suggestions * Remove blank line Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com> --------- Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Этот коммит содержится в:
16
app/ldap.go
16
app/ldap.go
@@ -19,12 +19,18 @@ import (
|
|||||||
func (a *App) SyncLdap(includeRemovedMembers bool) {
|
func (a *App) SyncLdap(includeRemovedMembers bool) {
|
||||||
a.Srv().Go(func() {
|
a.Srv().Go(func() {
|
||||||
|
|
||||||
if license := a.Srv().License(); license != nil && *license.Features.LDAP && *a.Config().LdapSettings.EnableSync {
|
if license := a.Srv().License(); license != nil && *license.Features.LDAP {
|
||||||
if ldapI := a.Ldap(); ldapI != nil {
|
if !*a.Config().LdapSettings.EnableSync {
|
||||||
ldapI.StartSynchronizeJob(false, includeRemovedMembers)
|
mlog.Error("LdapSettings.EnableSync is set to false. Skipping LDAP sync.")
|
||||||
} else {
|
return
|
||||||
mlog.Error("Not executing ldap sync because ldap is not available")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ldapI := a.Ldap()
|
||||||
|
if ldapI == nil {
|
||||||
|
mlog.Error("Not executing ldap sync because ldap is not available")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ldapI.StartSynchronizeJob(false, includeRemovedMembers)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user