Skip to content

The open alternative to Salesforce, designed for AI.

fix(dpa): stop recording a click-through DPA on every signup (#28504)

Félix Malfaita3ffe3db205d
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx
index e213c2cf77c..a5d32fc4dc4 100644
--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx
+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx
@@ -57,13 +57,7 @@ const StyledSeparator = styled.span`
color: ${themeCssVariables.font.color.tertiary};
`;
-type FooterNoteProps = {
- secondaryAgreement?: 'privacyPolicy' | 'dataProcessingAgreement';
-};
-
-export const FooterNote = ({
- secondaryAgreement = 'privacyPolicy',
-}: FooterNoteProps) => {
+export const FooterNote = () => {
const { isOnAWorkspace } = useIsCurrentLocationOnAWorkspace();
const { i18n } = useLingui();
@@ -82,23 +76,13 @@ export const FooterNote = ({
<Trans>Terms of Service</Trans>
</a>{' '}
<Trans>and</Trans>{' '}
- {secondaryAgreement === 'dataProcessingAgreement' ? (
- <a
- href="https://twenty.com/legal/dpa"
- target="_blank"
- rel="noopener noreferrer"
- >
- <Trans>Data Processing Agreement</Trans>
- </a>
- ) : (
- <a
- href={getTwentyWebsiteUrl(i18n.locale, 'privacy-policy')}
- target="_blank"
- rel="noopener noreferrer"
- >
- <Trans>Privacy Policy</Trans>
- </a>
- )}
+ <a
+ href={getTwentyWebsiteUrl(i18n.locale, 'privacy-policy')}
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <Trans>Privacy Policy</Trans>
+ </a>
.
</StyledCopyContainer>
);
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx
index c6590dacac7..7feb321f993 100644
--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx
+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx
@@ -65,9 +65,7 @@ export const SignInUpStandardContent = ({
SignInUpStep.TwoFactorAuthenticationRecovery,
SignInUpStep.WorkspaceSelection,
SignInUpStep.WorkspaceCreation,
- ].includes(signInUpStep) && (
- <FooterNote secondaryAgreement="dataProcessingAgreement" />
- )}
+ ].includes(signInUpStep) && <FooterNote />}
</StyledAuthContent>
);
};
diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts
index fc3214c022b..8c178d985fd 100644
--- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts
@@ -38,10 +38,6 @@ import {
import { MAX_WORKSPACES_WITHOUT_ENTERPRISE_KEY } from 'src/engine/core-modules/auth/constants/max-workspaces-without-organization-key.constants';
import { getSignUpWithoutWorkspaceDecision } from 'src/engine/core-modules/auth/utils/get-sign-up-without-workspace-decision.util';
import { hasProvisionedSignUpDestination } from 'src/engine/core-modules/auth/utils/has-provisioned-sign-up-destination.util';
-import { DEFAULT_DPA_REGION } from 'src/engine/core-modules/dpa/config/dpa-region-config.constant';
-import { DpaAgreementEntity } from 'src/engine/core-modules/dpa/entities/dpa-agreement.entity';
-import { DpaAgreementType } from 'src/engine/core-modules/dpa/enums/dpa-agreement-type.enum';
-import { buildDpaAgreementRecord } from 'src/engine/core-modules/dpa/utils/build-dpa-agreement-record.util';
import {
type AuthProviderWithPasswordType,
type ExistingUserOrPartialUserWithPicture,
@@ -765,26 +761,6 @@ export class SignInUpService {
queryRunner,
);
- // Click-through DPA, recorded with the workspace as proof: only on managed cloud, where Twenty is the Processor
- // Billing is an independent flag and must not be used to detect cloud
- if (
- this.twentyConfigService.get('IS_MULTIWORKSPACE_ENABLED') === true
- ) {
- await queryRunner.manager.save(
- DpaAgreementEntity,
- buildDpaAgreementRecord({
- workspaceId: workspace.id,
- type: DpaAgreementType.CLICK_THROUGH,
- region:
- this.twentyConfigService.get('DPA_DEPLOYMENT_REGION') ??
- DEFAULT_DPA_REGION,
- acceptedAt: new Date(),
- acceptedByUserId: user.id,
- acceptedByEmail: email,
- }),
- );
- }
-
return {
user,
workspace,
diff --git a/packages/twenty-server/src/engine/core-modules/dpa/enums/dpa-agreement-type.enum.ts b/packages/twenty-server/src/engine/core-modules/dpa/enums/dpa-agreement-type.enum.ts
index 2649e63df26..27fb3423c43 100644
--- a/packages/twenty-server/src/engine/core-modules/dpa/enums/dpa-agreement-type.enum.ts
+++ b/packages/twenty-server/src/engine/core-modules/dpa/enums/dpa-agreement-type.enum.ts
@@ -1,4 +1,4 @@
-// CLICK_THROUGH: accepted by reference at signup (acceptance = execution), no signing UI.
+// CLICK_THROUGH: legacy rows recorded at signup; no longer created.
// SIGNED: generated in-app, pre-signed by Twenty with customer entity + signatory, stored as executed PDF.
export enum DpaAgreementType {
CLICK_THROUGH = 'CLICK_THROUGH',