diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-04-11 13:45:03 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-04-11 13:45:03 -0400 |
commit | 49ab8b216191749bd39694d79f687a84ad24adf0 (patch) | |
tree | 27b4966d437b15ddcd8d420b8a1afc1881455c13 /model | |
parent | 5b96ad59c502d435dbca95950c4590a575b2c5b9 (diff) | |
download | chat-49ab8b216191749bd39694d79f687a84ad24adf0.tar.gz chat-49ab8b216191749bd39694d79f687a84ad24adf0.tar.bz2 chat-49ab8b216191749bd39694d79f687a84ad24adf0.zip |
Add custom branding functionality (#2667)
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 12 | ||||
-rw-r--r-- | model/license.go | 16 |
2 files changed, 23 insertions, 5 deletions
diff --git a/model/config.go b/model/config.go index a8974359d..26c71d07f 100644 --- a/model/config.go +++ b/model/config.go @@ -158,6 +158,8 @@ type TeamSettings struct { RestrictCreationToDomains string RestrictTeamNames *bool EnableTeamListing *bool + EnableCustomBrand *bool + CustomBrandText *string } type LdapSettings struct { @@ -296,6 +298,16 @@ func (o *Config) SetDefaults() { *o.TeamSettings.EnableTeamListing = false } + if o.TeamSettings.EnableCustomBrand == nil { + o.TeamSettings.EnableCustomBrand = new(bool) + *o.TeamSettings.EnableCustomBrand = false + } + + if o.TeamSettings.CustomBrandText == nil { + o.TeamSettings.CustomBrandText = new(string) + *o.TeamSettings.CustomBrandText = "" + } + if o.EmailSettings.EnableSignInWithEmail == nil { o.EmailSettings.EnableSignInWithEmail = new(bool) diff --git a/model/license.go b/model/license.go index cab22a685..0cea67c3d 100644 --- a/model/license.go +++ b/model/license.go @@ -32,11 +32,12 @@ type Customer struct { } type Features struct { - Users *int `json:"users"` - LDAP *bool `json:"ldap"` - MFA *bool `json:"mfa"` - GoogleSSO *bool `json:"google_sso"` - Compliance *bool `json:"compliance"` + Users *int `json:"users"` + LDAP *bool `json:"ldap"` + MFA *bool `json:"mfa"` + GoogleSSO *bool `json:"google_sso"` + Compliance *bool `json:"compliance"` + CustomBrand *bool `json:"custom_brand"` } func (f *Features) SetDefaults() { @@ -64,6 +65,11 @@ func (f *Features) SetDefaults() { f.Compliance = new(bool) *f.Compliance = true } + + if f.CustomBrand == nil { + f.CustomBrand = new(bool) + *f.CustomBrand = true + } } func (l *License) IsExpired() bool { |