diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-07-10 01:54:25 -0700 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-07-10 10:54:25 +0200 |
commit | 74e5d8ae66186a82e8afdd845a108d6a662751d7 (patch) | |
tree | faeeee70a251b636bae0afb4e60c611e00c2cc6b /model | |
parent | 951e4ad98401e9828b9941224318f105fb15d500 (diff) | |
download | chat-74e5d8ae66186a82e8afdd845a108d6a662751d7.tar.gz chat-74e5d8ae66186a82e8afdd845a108d6a662751d7.tar.bz2 chat-74e5d8ae66186a82e8afdd845a108d6a662751d7.zip |
MM-11120 Adding setting to disable email invitations and rate limiting. (#9063)
* Adding setting to disable email invitations.
* Adding a setting and rate limiting for email invite sending.
* Modifying email rate limit to 20/user/hour
* Adding EnableEmailInvitations to client side config and command.
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index be940d893..1388f896f 100644 --- a/model/config.go +++ b/model/config.go @@ -237,9 +237,19 @@ type ServiceSettings struct { EnableAPITeamDeletion *bool ExperimentalEnableHardenedMode *bool ExperimentalLimitClientConfig *bool + EnableEmailInvitations *bool } func (s *ServiceSettings) SetDefaults() { + if s.EnableEmailInvitations == nil { + // If the site URL is also not present then assume this is a clean install + if s.SiteURL == nil { + s.EnableEmailInvitations = NewBool(false) + } else { + s.EnableEmailInvitations = NewBool(true) + } + } + if s.SiteURL == nil { s.SiteURL = NewString(SERVICE_SETTINGS_DEFAULT_SITE_URL) } |