提交 20735470 编写于 作者: J Joram Wilander 提交者: enahum

Update licensing switches for Office365 and Google SSO through OAuth2 (#3786)

上级 7bb6a439
......@@ -35,8 +35,8 @@ type Features struct {
Users *int `json:"users"`
LDAP *bool `json:"ldap"`
MFA *bool `json:"mfa"`
GoogleSSO *bool `json:"google_sso"`
Office365SSO *bool `json:"office365_sso"`
GoogleOAuth *bool `json:"google_oauth"`
Office365OAuth *bool `json:"office365_oauth"`
Compliance *bool `json:"compliance"`
Cluster *bool `json:"cluster"`
CustomBrand *bool `json:"custom_brand"`
......@@ -67,14 +67,14 @@ func (f *Features) SetDefaults() {
*f.MFA = *f.FutureFeatures
}
if f.GoogleSSO == nil {
f.GoogleSSO = new(bool)
*f.GoogleSSO = true
if f.GoogleOAuth == nil {
f.GoogleOAuth = new(bool)
*f.GoogleOAuth = *f.FutureFeatures
}
if f.Office365SSO == nil {
f.Office365SSO = new(bool)
*f.Office365SSO = true
if f.Office365OAuth == nil {
f.Office365OAuth = new(bool)
*f.Office365OAuth = *f.FutureFeatures
}
if f.Compliance == nil {
......
......@@ -299,11 +299,11 @@ func getClientConfig(c *model.Config) map[string]string {
props["EnableCluster"] = strconv.FormatBool(*c.ClusterSettings.Enable)
}
if *License.Features.GoogleSSO {
if *License.Features.GoogleOAuth {
props["EnableSignUpWithGoogle"] = strconv.FormatBool(c.GoogleSettings.Enable)
}
if *License.Features.Office365SSO {
if *License.Features.Office365OAuth {
props["EnableSignUpWithOffice365"] = strconv.FormatBool(c.Office365Settings.Enable)
}
......
......@@ -123,8 +123,8 @@ func getClientLicense(l *model.License) map[string]string {
props["MFA"] = strconv.FormatBool(*l.Features.MFA)
props["SAML"] = strconv.FormatBool(*l.Features.SAML)
props["Cluster"] = strconv.FormatBool(*l.Features.Cluster)
props["GoogleSSO"] = strconv.FormatBool(*l.Features.GoogleSSO)
props["Office365SSO"] = strconv.FormatBool(*l.Features.Office365SSO)
props["GoogleOAuth"] = strconv.FormatBool(*l.Features.GoogleOAuth)
props["Office365OAuth"] = strconv.FormatBool(*l.Features.Office365OAuth)
props["Compliance"] = strconv.FormatBool(*l.Features.Compliance)
props["CustomBrand"] = strconv.FormatBool(*l.Features.CustomBrand)
props["MHPNS"] = strconv.FormatBool(*l.Features.MHPNS)
......
......@@ -402,10 +402,10 @@ export default class OAuthSettings extends AdminSettings {
oauthTypes.push({value: 'off', text: Utils.localizeMessage('admin.oauth.off', 'Do not allow sign-in via an OAuth 2.0 provider.')});
oauthTypes.push({value: Constants.GITLAB_SERVICE, text: Utils.localizeMessage('admin.oauth.gitlab', 'GitLab')});
if (global.window.mm_license.IsLicensed === 'true') {
if (global.window.mm_license.GoogleSSO === 'true') {
if (global.window.mm_license.GoogleOAuth === 'true') {
oauthTypes.push({value: Constants.GOOGLE_SERVICE, text: Utils.localizeMessage('admin.oauth.google', 'Google Apps')});
}
if (global.window.mm_license.Office365SSO === 'true') {
if (global.window.mm_license.Office365OAuth === 'true') {
oauthTypes.push({value: Constants.OFFICE365_SERVICE, text: Utils.localizeMessage('admin.oauth.office365', 'Office 365 (Beta)')});
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册