refactor(core): Move more code into @n8n/permissions. Add aditional tests and docs (no-changelog) (#15062)

Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-05-06 15:11:05 +02:00
committed by GitHub
co-authored by Danny Martini
parent cdcd059248
commit 2bb190349b
85 changed files with 1011 additions and 775 deletions
@@ -1,6 +1,6 @@
import type { ProjectRole } from '@n8n/api-types';
import { generateNanoId } from '@n8n/db';
import type { User } from '@n8n/db';
import type { ProjectRole } from '@n8n/permissions';
import { UserError } from 'n8n-workflow';
import { nanoid } from 'nanoid';
@@ -1,6 +1,6 @@
import type { ProjectRole } from '@n8n/api-types';
import { ProjectRelation } from '@n8n/db';
import { Service } from '@n8n/di';
import type { ProjectRole } from '@n8n/permissions';
import { DataSource, In, Repository } from '@n8n/typeorm';
@Service()
@@ -1,7 +1,7 @@
import type { ProjectRole } from '@n8n/api-types';
import { SharedCredentials } from '@n8n/db';
import type { Project, CredentialSharingRole } from '@n8n/db';
import type { Project } from '@n8n/db';
import { Service } from '@n8n/di';
import type { CredentialSharingRole, ProjectRole } from '@n8n/permissions';
import type { EntityManager, FindOptionsWhere } from '@n8n/typeorm';
import { DataSource, In, Not, Repository } from '@n8n/typeorm';
@@ -1,6 +1,7 @@
import { SharedWorkflow } from '@n8n/db';
import type { Project, WorkflowSharingRole } from '@n8n/db';
import type { Project } from '@n8n/db';
import { Service } from '@n8n/di';
import type { WorkflowSharingRole } from '@n8n/permissions';
import { DataSource, Repository, In, Not } from '@n8n/typeorm';
import type { EntityManager, FindManyOptions, FindOptionsWhere } from '@n8n/typeorm';