mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Move migrations to @n8n/db (#15362)
This commit is contained in:
@@ -3,11 +3,14 @@ import { GlobalConfig } from '@n8n/config';
|
||||
import type { User } from '@n8n/db';
|
||||
import { ApiKeyRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import type { ApiKeyScope } from '@n8n/permissions';
|
||||
import {
|
||||
getApiKeyScopesForRole,
|
||||
getOwnerOnlyApiKeyScopes,
|
||||
type ApiKeyScope,
|
||||
} from '@n8n/permissions';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import type { License } from '@/license';
|
||||
import { getApiKeyScopesForRole, getOwnerOnlyApiKeyScopes } from '@/public-api/permissions.ee';
|
||||
import { PublicApiKeyService } from '@/services/public-api-key.service';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { LDAP_DEFAULT_CONFIGURATION } from '@n8n/constants';
|
||||
import type { User } from '@n8n/db';
|
||||
import { AuthProviderSyncHistoryRepository } from '@n8n/db';
|
||||
import { UserRepository } from '@n8n/db';
|
||||
@@ -7,7 +8,6 @@ import type { Entry as LdapUser } from 'ldapts';
|
||||
import { Cipher } from 'n8n-core';
|
||||
|
||||
import config from '@/config';
|
||||
import { LDAP_DEFAULT_CONFIGURATION } from '@/ldap.ee/constants';
|
||||
import { saveLdapSynchronization } from '@/ldap.ee/helpers.ee';
|
||||
import { LdapService } from '@/ldap.ee/ldap.service.ee';
|
||||
import {
|
||||
|
||||
@@ -6,10 +6,10 @@ import { TagRepository } from '@n8n/db';
|
||||
import { SharedCredentialsRepository } from '@n8n/db';
|
||||
import { SharedWorkflowRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import { getOwnerOnlyApiKeyScopes } from '@n8n/permissions';
|
||||
import { randomString } from 'n8n-workflow';
|
||||
import validator from 'validator';
|
||||
|
||||
import { getOwnerOnlyApiKeyScopes } from '@/public-api/permissions.ee';
|
||||
import { affixRoleToSaveCredential, createCredentials } from '@test-integration/db/credentials';
|
||||
import { createErrorExecution, createSuccessfulExecution } from '@test-integration/db/executions';
|
||||
import { createTeamProject, getProjectByNameOrFail } from '@test-integration/db/projects';
|
||||
|
||||
@@ -5,11 +5,11 @@ import { AuthUserRepository } from '@n8n/db';
|
||||
import { UserRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import type { ApiKeyScope, GlobalRole } from '@n8n/permissions';
|
||||
import { getApiKeyScopesForRole } from '@n8n/permissions';
|
||||
import { hash } from 'bcryptjs';
|
||||
|
||||
import { MfaService } from '@/mfa/mfa.service';
|
||||
import { TOTPService } from '@/mfa/totp.service';
|
||||
import { getApiKeyScopesForRole } from '@/public-api/permissions.ee';
|
||||
import { PublicApiKeyService } from '@/services/public-api-key.service';
|
||||
|
||||
import { randomEmail, randomName, randomValidPassword } from '../random';
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import type { LdapConfig } from '@n8n/constants';
|
||||
import { LDAP_DEFAULT_CONFIGURATION, LDAP_FEATURE_NAME } from '@n8n/constants';
|
||||
import { SettingsRepository } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
|
||||
import { LDAP_DEFAULT_CONFIGURATION, LDAP_FEATURE_NAME } from '@/ldap.ee/constants';
|
||||
import type { LdapConfig } from '@/ldap.ee/types';
|
||||
|
||||
export const defaultLdapConfig = {
|
||||
...LDAP_DEFAULT_CONFIGURATION,
|
||||
loginEnabled: true,
|
||||
|
||||
Reference in New Issue
Block a user