From 74e5d8ae66186a82e8afdd845a108d6a662751d7 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 10 Jul 2018 01:54:25 -0700 Subject: 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. --- model/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/config.go') 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) } -- cgit v1.2.3-1-g7c22