mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
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:
committed by
GitHub
parent
5f6183a031
commit
a81ca7c19c
@@ -8,6 +8,11 @@ import { LICENSE_FEATURES, N8N_VERSION, SETTINGS_LICENSE_CERT_KEY } from './cons
|
||||
import { Service } from 'typedi';
|
||||
|
||||
async function loadCertStr(): Promise<TLicenseContainerStr> {
|
||||
// if we have an ephemeral license, we don't want to load it from the database
|
||||
const ephemeralLicense = config.get('license.cert');
|
||||
if (ephemeralLicense) {
|
||||
return ephemeralLicense;
|
||||
}
|
||||
const databaseSettings = await Db.collections.Settings.findOne({
|
||||
where: {
|
||||
key: SETTINGS_LICENSE_CERT_KEY,
|
||||
@@ -18,6 +23,8 @@ async function loadCertStr(): Promise<TLicenseContainerStr> {
|
||||
}
|
||||
|
||||
async function saveCertStr(value: TLicenseContainerStr): Promise<void> {
|
||||
// if we have an ephemeral license, we don't want to save it to the database
|
||||
if (config.get('license.cert')) return;
|
||||
await Db.collections.Settings.upsert(
|
||||
{
|
||||
key: SETTINGS_LICENSE_CERT_KEY,
|
||||
|
||||
Reference in New Issue
Block a user