fix(core): Do not return inviteAcceptUrl in response if email was sent (#7465)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-19 13:58:06 +02:00
committed by GitHub
parent ab6a9bbac2
commit 55c6a1b0d3
11 changed files with 74 additions and 102 deletions

View File

@@ -16,7 +16,7 @@ import { CredentialsOverwrites } from '@/CredentialsOverwrites';
import { CredentialTypes } from '@/CredentialTypes';
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import { License } from '@/License';
import { getInstanceBaseUrl, isEmailSetUp } from '@/UserManagement/UserManagementHelper';
import { getInstanceBaseUrl } from '@/UserManagement/UserManagementHelper';
import * as WebhookHelpers from '@/WebhookHelpers';
import { LoggerProxy } from 'n8n-workflow';
import config from '@/config';
@@ -28,6 +28,7 @@ import {
getWorkflowHistoryLicensePruneTime,
getWorkflowHistoryPruneTime,
} from '@/workflows/workflowHistory/workflowHistoryHelper.ee';
import { UserManagementMailer } from '@/UserManagement/email';
@Service()
export class FrontendService {
@@ -38,6 +39,7 @@ export class FrontendService {
private readonly credentialTypes: CredentialTypes,
private readonly credentialsOverwrites: CredentialsOverwrites,
private readonly license: License,
private readonly mailer: UserManagementMailer,
) {
this.initSettings();
}
@@ -103,7 +105,7 @@ export class FrontendService {
userManagement: {
quota: this.license.getUsersLimit(),
showSetupOnFirstLoad: !config.getEnv('userManagement.isInstanceOwnerSetUp'),
smtpSetup: isEmailSetUp(),
smtpSetup: this.mailer.isEmailSetUp,
authenticationMethod: getCurrentAuthenticationMethod(),
},
sso: {