refactor(core): Move shared workflow and shared credentials repositories to @n8n/db (#15255)

This commit is contained in:
Iván Ovejero
2025-05-09 17:10:25 +02:00
committed by GitHub
parent e34bca779b
commit 1f6a36e26e
56 changed files with 119 additions and 93 deletions

View File

@@ -1,14 +1,11 @@
import type { User } from '@n8n/db';
import { ProjectRepository } from '@n8n/db';
import { ProjectRepository, SharedCredentialsRepository, SharedWorkflowRepository } from '@n8n/db';
import { Container } from '@n8n/di';
import { hasGlobalScope, rolesWithScope, type Scope } from '@n8n/permissions';
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
import { In } from '@n8n/typeorm';
import { UnexpectedError } from 'n8n-workflow';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
/**
* Check if a user has the required scopes. The check can be:
*