4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-16 07:12:31 +00:00

Sync with mattermost 2.2.0 release

This commit is contained in:
Wim
2016-04-16 20:39:43 +02:00
parent de4c780410
commit 51265d5464
20 changed files with 1068 additions and 579 deletions

View File

@@ -32,14 +32,19 @@ 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"`
GoogleSSO *bool `json:"google_sso"`
MHPNS *bool `json:"mhpns"`
FutureFeatures *bool `json:"future_features"`
}
func (f *Features) SetDefaults() {
if f.FutureFeatures == nil {
f.FutureFeatures = new(bool)
*f.FutureFeatures = true
}
if f.Users == nil {
f.Users = new(int)
*f.Users = 0
@@ -47,22 +52,17 @@ func (f *Features) SetDefaults() {
if f.LDAP == nil {
f.LDAP = new(bool)
*f.LDAP = true
}
if f.MFA == nil {
f.MFA = new(bool)
*f.MFA = true
*f.LDAP = *f.FutureFeatures
}
if f.GoogleSSO == nil {
f.GoogleSSO = new(bool)
*f.GoogleSSO = true
*f.GoogleSSO = *f.FutureFeatures
}
if f.Compliance == nil {
f.Compliance = new(bool)
*f.Compliance = true
if f.MHPNS == nil {
f.MHPNS = new(bool)
*f.MHPNS = *f.FutureFeatures
}
}