mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Implementing server side of LDAP sync now button (#3430)
This commit is contained in:
committed by
Corey Hulen
parent
b3b90a7531
commit
6c5a8be6bf
@@ -860,6 +860,20 @@ func (c *Client) GetSystemAnalytics(name string) (*Result, *AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
// Initiate immediate synchronization of LDAP users.
|
||||
// The synchronization will be performed asynchronously and this function will
|
||||
// always return OK unless you don't have permissions.
|
||||
// You must be the system administrator to use this function.
|
||||
func (c *Client) LdapSyncNow() (*Result, *AppError) {
|
||||
if r, err := c.DoApiPost("/admin/ldap_sync_now", ""); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return &Result{r.Header.Get(HEADER_REQUEST_ID),
|
||||
r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) CreateChannel(channel *Channel) (*Result, *AppError) {
|
||||
if r, err := c.DoApiPost(c.GetTeamRoute()+"/channels/create", channel.ToJson()); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user