Compare commits

...

1 Commits

Author SHA1 Message Date
Shivashis Padhi
b0111a59a7 Revert "[MM-47384] Make openid, google, office365 oauth free (#6755)"
This reverts commit 4bacba92bb.
2023-01-24 13:21:58 +05:30

View File

@@ -60,19 +60,9 @@ export function loginOptions(config: ClientConfig, license: ClientLicense) {
const isLicensed = license.IsLicensed === 'true';
const samlEnabled = config.EnableSaml === 'true' && isLicensed && license.SAML === 'true';
const gitlabEnabled = config.EnableSignUpWithGitLab === 'true';
const isMinServerVersionForFreeOAuth = isMinimumServerVersion(config.Version, 7, 6);
let googleEnabled = false;
let o365Enabled = false;
let openIdEnabled = false;
if (isMinServerVersionForFreeOAuth) {
googleEnabled = config.EnableSignUpWithGoogle === 'true';
o365Enabled = config.EnableSignUpWithOffice365 === 'true';
openIdEnabled = config.EnableSignUpWithOpenId === 'true';
} else {
googleEnabled = config.EnableSignUpWithGoogle === 'true' && isLicensed;
o365Enabled = config.EnableSignUpWithOffice365 === 'true' && isLicensed && license.Office365OAuth === 'true';
openIdEnabled = config.EnableSignUpWithOpenId === 'true' && isLicensed;
}
const googleEnabled = config.EnableSignUpWithGoogle === 'true' && isLicensed;
const o365Enabled = config.EnableSignUpWithOffice365 === 'true' && isLicensed && license.Office365OAuth === 'true';
const openIdEnabled = config.EnableSignUpWithOpenId === 'true' && isLicensed;
const ldapEnabled = isLicensed && config.EnableLdap === 'true' && license.LDAP === 'true';
const hasLoginForm = config.EnableSignInWithEmail === 'true' || config.EnableSignInWithUsername === 'true' || ldapEnabled;
const ssoOptions: Record<string, boolean> = {