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) {
|
||||
a.Srv().Go(func() {
|
||||
|
||||
if license := a.Srv().License(); license != nil && *license.Features.LDAP && *a.Config().LdapSettings.EnableSync {
|
||||
if ldapI := a.Ldap(); ldapI != nil {
|
||||
ldapI.StartSynchronizeJob(false, includeRemovedMembers)
|
||||
} else {
|
||||
mlog.Error("Not executing ldap sync because ldap is not available")
|
||||
if license := a.Srv().License(); license != nil && *license.Features.LDAP {
|
||||
if !*a.Config().LdapSettings.EnableSync {
|
||||
mlog.Error("LdapSettings.EnableSync is set to false. Skipping LDAP sync.")
|
||||
return
|
||||
}
|
||||
|
||||
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