chore(core): Use roles from database in global roles (#18768)

This commit is contained in:
Andreas Fitzek
2025-08-26 17:53:46 +02:00
committed by GitHub
parent cff3f4a67e
commit ecad12b77a
117 changed files with 956 additions and 424 deletions

View File

@@ -1,5 +1,5 @@
import { testDb } from '@n8n/backend-test-utils';
import type { User } from '@n8n/db';
import { GLOBAL_MEMBER_ROLE, GLOBAL_OWNER_ROLE, type User } from '@n8n/db';
import nock from 'nock';
import config from '@/config';
@@ -21,8 +21,8 @@ let authMemberAgent: SuperAgentTest;
const testServer = utils.setupTestServer({ endpointGroups: ['license'] });
beforeAll(async () => {
owner = await createUserShell('global:owner');
member = await createUserShell('global:member');
owner = await createUserShell(GLOBAL_OWNER_ROLE);
member = await createUserShell(GLOBAL_MEMBER_ROLE);
authOwnerAgent = testServer.authAgentFor(owner);
authMemberAgent = testServer.authAgentFor(member);