summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/config.go10
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)
}