refactor(core): Finish removing UserManagementHelper (no-changelog) (#8418)

This commit is contained in:
Iván Ovejero
2024-01-23 13:58:31 +01:00
committed by GitHub
parent 2257ec63b3
commit c0bc94c78f
12 changed files with 36 additions and 36 deletions

View File

@@ -3,7 +3,6 @@ import { In } from 'typeorm';
import type { IUser } from 'n8n-workflow';
import type { ListQuery } from '@/requests';
import * as UserManagementHelpers from '@/UserManagement/UserManagementHelper';
import type { Role } from '@db/entities/Role';
import type { User } from '@db/entities/User';
@@ -16,10 +15,11 @@ import { getCredentialOwnerRole, getGlobalMemberRole, getGlobalOwnerRole } from
import { createManyUsers, createUser, createUserShell } from './shared/db/users';
import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository';
import Container from 'typedi';
import { License } from '@/License';
import { mockInstance } from '../shared/mocking';
import { UserManagementMailer } from '@/UserManagement/email';
const sharingSpy = jest.spyOn(UserManagementHelpers, 'isSharingEnabled').mockReturnValue(true);
const sharingSpy = jest.spyOn(License.prototype, 'isSharingEnabled').mockReturnValue(true);
const testServer = utils.setupTestServer({ endpointGroups: ['credentials'] });
let globalMemberRole: Role;