diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 8 | ||||
-rw-r--r-- | model/license.go | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/model/config.go b/model/config.go index 05d574cb2..4b00e835d 100644 --- a/model/config.go +++ b/model/config.go @@ -22,8 +22,9 @@ const ( PASSWORD_MAXIMUM_LENGTH = 64 PASSWORD_MINIMUM_LENGTH = 5 - SERVICE_GITLAB = "gitlab" - SERVICE_GOOGLE = "google" + SERVICE_GITLAB = "gitlab" + SERVICE_GOOGLE = "google" + SERVICE_OFFICE365 = "office365" WEBSERVER_MODE_REGULAR = "regular" WEBSERVER_MODE_GZIP = "gzip" @@ -287,6 +288,7 @@ type Config struct { SupportSettings SupportSettings GitLabSettings SSOSettings GoogleSettings SSOSettings + Office365Settings SSOSettings LdapSettings LdapSettings ComplianceSettings ComplianceSettings LocalizationSettings LocalizationSettings @@ -309,6 +311,8 @@ func (o *Config) GetSSOService(service string) *SSOSettings { return &o.GitLabSettings case SERVICE_GOOGLE: return &o.GoogleSettings + case SERVICE_OFFICE365: + return &o.Office365Settings } return nil diff --git a/model/license.go b/model/license.go index a77a7349a..a60695890 100644 --- a/model/license.go +++ b/model/license.go @@ -36,6 +36,7 @@ type Features struct { LDAP *bool `json:"ldap"` MFA *bool `json:"mfa"` GoogleSSO *bool `json:"google_sso"` + Office365SSO *bool `json:"office365_sso"` Compliance *bool `json:"compliance"` CustomBrand *bool `json:"custom_brand"` MHPNS *bool `json:"mhpns"` @@ -67,7 +68,12 @@ func (f *Features) SetDefaults() { if f.GoogleSSO == nil { f.GoogleSSO = new(bool) - *f.GoogleSSO = *f.FutureFeatures + *f.GoogleSSO = true + } + + if f.Office365SSO == nil { + f.Office365SSO = new(bool) + *f.Office365SSO = true } if f.Compliance == nil { |