feat(core): Read ephemeral license from environment and clean up ee flags (#5797)

* remove enterprise feature schema for license.cert

* bump license sdk version

* Update packages/cli/package.json

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>

---------

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>
This commit is contained in:
Michael Auerswald
2023-03-28 17:21:40 +02:00
committed by GitHub
parent 5f6183a031
commit a81ca7c19c
18 changed files with 59 additions and 69 deletions

View File

@@ -28,8 +28,6 @@ export class SamlUrls {
export const SAML_PREFERENCES_DB_KEY = 'features.saml';
export const SAML_ENTERPRISE_FEATURE_ENABLED = 'enterprise.features.saml';
export const SAML_LOGIN_LABEL = 'sso.saml.loginLabel';
export const SAML_LOGIN_ENABLED = 'sso.saml.loginEnabled';

View File

@@ -10,7 +10,7 @@ import type { SamlPreferences } from './types/samlPreferences';
import type { SamlUserAttributes } from './types/samlUserAttributes';
import type { FlowResult } from 'samlify/types/src/flow';
import type { SamlAttributeMapping } from './types/samlAttributeMapping';
import { SAML_ENTERPRISE_FEATURE_ENABLED, SAML_LOGIN_ENABLED, SAML_LOGIN_LABEL } from './constants';
import { SAML_LOGIN_ENABLED, SAML_LOGIN_LABEL } from './constants';
import {
isEmailCurrentAuthenticationMethod,
isSamlCurrentAuthenticationMethod,
@@ -52,10 +52,7 @@ export function setSamlLoginLabel(label: string): void {
export function isSamlLicensed(): boolean {
const license = Container.get(License);
return (
isUserManagementEnabled() &&
(license.isSamlEnabled() || config.getEnv(SAML_ENTERPRISE_FEATURE_ENABLED))
);
return isUserManagementEnabled() && license.isSamlEnabled();
}
export function isSamlLicensedAndEnabled(): boolean {