PLT-7542 Converting LDAP sync to the job server (#7452)
* PLT-7542 Converting LDAP sync to the job server * Fixing minor issues * Fixing build failure * Translate error message * Translate error message * Translate error message * Translate error message * Fixing merge * Fixing bad merge
Этот коммит содержится в:
@@ -3,6 +3,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -32,8 +33,9 @@ func ldapSyncCmdF(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if ldapI := a.Ldap; ldapI != nil {
|
||||
if err := ldapI.Syncronize(); err != nil {
|
||||
CommandPrintErrorln("ERROR: AD/LDAP Synchronization Failed")
|
||||
job, err := ldapI.StartSynchronizeJob(true)
|
||||
if err != nil || job.Status == model.JOB_STATUS_ERROR || job.Status == model.JOB_STATUS_CANCELED {
|
||||
CommandPrintErrorln("ERROR: AD/LDAP Synchronization please check the server logs")
|
||||
} else {
|
||||
CommandPrettyPrintln("SUCCESS: AD/LDAP Synchronization Complete")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user