forked from Ivasoft/mattermost-mobile
Revert "[MM-47384] Make openid, google, office365 oauth free (#6755)"
This reverts commit 4bacba92bb.
This commit is contained in:
@@ -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> = {
|
||||
|
||||
Reference in New Issue
Block a user