[MM-33908] Resync LDAP Groups to Teams and Channels (#17372)
* add includeRemovedMembers flag * fix API call in client4.go * remove check for 'since' * add comments * run make app-layers * re-run CI tests Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3e5b0a7d7f
Коммит
9f4902e188
@@ -33,6 +33,7 @@ var LdapIdMigrate = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
LdapSyncCmd.Flags().Bool("include-removed-members", false, "Include members who left or were removed from a group-synced team/channel")
|
||||
LdapCmd.AddCommand(
|
||||
LdapSyncCmd,
|
||||
LdapIdMigrate,
|
||||
@@ -47,8 +48,10 @@ func ldapSyncCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
defer a.Srv().Shutdown()
|
||||
|
||||
includeRemovedMembers, _ := command.Flags().GetBool("include-removed-members")
|
||||
|
||||
if ldapI := a.Ldap(); ldapI != nil {
|
||||
job, err := ldapI.StartSynchronizeJob(true)
|
||||
job, err := ldapI.StartSynchronizeJob(true, includeRemovedMembers)
|
||||
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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user