diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-21 15:11:56 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-21 15:11:56 -0700 |
commit | ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c (patch) | |
tree | 3c890327d884b33ad149196ddf9879313b2b000b /model | |
parent | ee5a77ec56ee13f5eb96fce6065b4b7a1845de89 (diff) | |
download | chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.tar.gz chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.tar.bz2 chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.zip |
Adding email to admin console
Diffstat (limited to 'model')
-rw-r--r-- | model/client.go | 9 | ||||
-rw-r--r-- | model/config.go | 21 |
2 files changed, 21 insertions, 9 deletions
diff --git a/model/client.go b/model/client.go index f9127719f..823e859cf 100644 --- a/model/client.go +++ b/model/client.go @@ -403,6 +403,15 @@ func (c *Client) SaveConfig(config *Config) (*Result, *AppError) { } } +func (c *Client) TestEmail(config *Config) (*Result, *AppError) { + if r, err := c.DoApiPost("/admin/test_email", config.ToJson()); err != nil { + return nil, err + } else { + 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("/channels/create", channel.ToJson()); err != nil { return nil, err diff --git a/model/config.go b/model/config.go index 3b333dbe1..5240caf55 100644 --- a/model/config.go +++ b/model/config.go @@ -22,7 +22,6 @@ type ServiceSettings struct { UseLocalStorage bool StorageDirectory string AllowedLoginAttempts int - DisableEmailSignUp bool EnableOAuthServiceProvider bool } @@ -73,14 +72,18 @@ type ImageSettings struct { } type EmailSettings struct { - ByPassEmail bool - SMTPUsername string - SMTPPassword string - SMTPServer string - UseTLS bool - UseStartTLS bool - FeedbackEmail string - FeedbackName string + AllowSignUpWithEmail bool + SendEmailNotifications bool + RequireEmailVerification bool + FeedbackName string + FeedbackEmail string + SMTPUsername string + SMTPPassword string + SMTPServer string + SMTPPort string + ConnectionSecurity string + + // For Future Use ApplePushServer string ApplePushCertPublic string ApplePushCertPrivate string |