Merge branch 'master' into PLT-1429
Этот коммит содержится в:
@@ -280,6 +280,14 @@ func (c *Client) LoginByEmail(name string, email string, password string) (*Resu
|
||||
return c.login(m)
|
||||
}
|
||||
|
||||
func (c *Client) LoginByUsername(name string, username string, password string) (*Result, *AppError) {
|
||||
m := make(map[string]string)
|
||||
m["name"] = name
|
||||
m["username"] = username
|
||||
m["password"] = password
|
||||
return c.login(m)
|
||||
}
|
||||
|
||||
func (c *Client) LoginByEmailWithDevice(name string, email string, password string, deviceId string) (*Result, *AppError) {
|
||||
m := make(map[string]string)
|
||||
m["name"] = name
|
||||
@@ -443,6 +451,15 @@ func (c *Client) GetLogs() (*Result, *AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) GetAllAudits() (*Result, *AppError) {
|
||||
if r, err := c.DoApiGet("/admin/audits", "", ""); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return &Result{r.Header.Get(HEADER_REQUEST_ID),
|
||||
r.Header.Get(HEADER_ETAG_SERVER), AuditsFromJson(r.Body)}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) GetClientProperties() (*Result, *AppError) {
|
||||
if r, err := c.DoApiGet("/admin/client_props", "", ""); err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -99,6 +99,8 @@ type FileSettings struct {
|
||||
|
||||
type EmailSettings struct {
|
||||
EnableSignUpWithEmail bool
|
||||
EnableSignInWithEmail *bool
|
||||
EnableSignInWithUsername *bool
|
||||
SendEmailNotifications bool
|
||||
RequireEmailVerification bool
|
||||
FeedbackName string
|
||||
@@ -260,6 +262,21 @@ func (o *Config) SetDefaults() {
|
||||
*o.TeamSettings.EnableTeamListing = false
|
||||
}
|
||||
|
||||
if o.EmailSettings.EnableSignInWithEmail == nil {
|
||||
o.EmailSettings.EnableSignInWithEmail = new(bool)
|
||||
|
||||
if o.EmailSettings.EnableSignUpWithEmail == true {
|
||||
*o.EmailSettings.EnableSignInWithEmail = true
|
||||
} else {
|
||||
*o.EmailSettings.EnableSignInWithEmail = false
|
||||
}
|
||||
}
|
||||
|
||||
if o.EmailSettings.EnableSignInWithUsername == nil {
|
||||
o.EmailSettings.EnableSignInWithUsername = new(bool)
|
||||
*o.EmailSettings.EnableSignInWithUsername = false
|
||||
}
|
||||
|
||||
if o.EmailSettings.SendPushNotifications == nil {
|
||||
o.EmailSettings.SendPushNotifications = new(bool)
|
||||
*o.EmailSettings.SendPushNotifications = false
|
||||
|
||||
Ссылка в новой задаче
Block a user