[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
@@ -4033,8 +4033,13 @@ func (c *Client4) GetClusterStatus() ([]*ClusterInfo, *Response) {
|
||||
// LDAP Section
|
||||
|
||||
// SyncLdap will force a sync with the configured LDAP server.
|
||||
func (c *Client4) SyncLdap() (bool, *Response) {
|
||||
r, err := c.DoApiPost(c.GetLdapRoute()+"/sync", "")
|
||||
// If includeRemovedMembers is true, then group members who left or were removed from a
|
||||
// synced team/channel will be re-joined; otherwise, they will be excluded.
|
||||
func (c *Client4) SyncLdap(includeRemovedMembers bool) (bool, *Response) {
|
||||
reqBody, _ := json.Marshal(map[string]interface{}{
|
||||
"include_removed_members": includeRemovedMembers,
|
||||
})
|
||||
r, err := c.doApiPostBytes(c.GetLdapRoute()+"/sync", reqBody)
|
||||
if err != nil {
|
||||
return false, BuildErrorResponse(r, err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user