feat: add endpoint for workflow sharing (#4172) (no changelog)

* feat: add endpoint for workflow sharing

Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
This commit is contained in:
Omar Ajoue
2022-10-11 14:55:05 +02:00
committed by GitHub
parent 3390b509aa
commit 07d21d2c5d
25 changed files with 483 additions and 65 deletions

View File

@@ -3,7 +3,7 @@ import { UserSettings } from 'n8n-core';
import { Db } from '../../src';
import { RESPONSE_ERROR_MESSAGES } from '../../src/constants';
import * as CredentialHelpers from '../../src/credentials/helpers';
import * as UserManagementHelpers from '../../src/UserManagement/UserManagementHelper';
import type { Role } from '../../src/databases/entities/Role';
import { randomCredentialPayload, randomName, randomString } from './shared/random';
import * as testDb from './shared/testDb';
@@ -17,10 +17,7 @@ import type { AuthAgent } from './shared/types';
jest.mock('../../src/telemetry');
// mock that credentialsSharing is not enabled
const mockIsCredentialsSharingEnabled = jest.spyOn(
CredentialHelpers,
'isCredentialsSharingEnabled',
);
const mockIsCredentialsSharingEnabled = jest.spyOn(UserManagementHelpers, 'isSharingEnabled');
mockIsCredentialsSharingEnabled.mockReturnValue(false);
let app: express.Application;