forked from Ivasoft/mattermost-mobile
Compare commits
1 Commits
release-2.
...
MM-49868_r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0111a59a7 |
@@ -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