[MM-47384] Make openid, google, office365 oauth free (#6755)
This commit is contained in:
parent
bcca6be0af
commit
4bacba92bb
1 changed files with 13 additions and 3 deletions
|
|
@ -58,9 +58,19 @@ 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 googleEnabled = config.EnableSignUpWithGoogle === 'true' && isLicensed;
|
||||
const o365Enabled = config.EnableSignUpWithOffice365 === 'true' && isLicensed && license.Office365OAuth === 'true';
|
||||
const openIdEnabled = config.EnableSignUpWithOpenId === 'true' && isLicensed;
|
||||
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 ldapEnabled = isLicensed && config.EnableLdap === 'true' && license.LDAP === 'true';
|
||||
const hasLoginForm = config.EnableSignInWithEmail === 'true' || config.EnableSignInWithUsername === 'true' || ldapEnabled;
|
||||
const ssoOptions: Record<string, boolean> = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue