Add custom branding functionality (#2667)

Этот коммит содержится в:
Joram Wilander
2016-04-11 13:45:03 -04:00
коммит произвёл Christopher Speller
родитель 5b96ad59c5
Коммит 49ab8b2161
24 изменённых файлов: 654 добавлений и 87 удалений

Просмотреть файл

@@ -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)

Просмотреть файл

@@ -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 {