Skip to content

Add a Data Processing Agreement link to Settings → License on Cloud - #1511

Merged
helpcodeai merged 2 commits into
mainfrom
feat/dpa-self-service-link
Nov 4, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
feat/dpa-self-service-link

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Paid Cloud workspaces get a "Data Processing Agreement" card under Settings → License. Its button asks the licence site for a one-hour link to the self-service DPA (HelpCode-ai/anythingmcp-website#502) and opens it in a new tab. There the admin accepts the agreement online, with no signature, and receives the PDF by email.

This server holds no DPA logic. It only vouches, with the service token, for the key of the workspace the signed-in admin belongs to, the same pattern as the billing portal.

Changes

  • POST /api/license/dpa-link (ADMIN, throttled to 10/min): LicenseService.createDpaLink sends the workspace key, the org id and name, the admin's email and name, and an optional page locale to /api/dpa/session on the licence site. Trials and community are refused before any call.
  • Cloud and self-hosted:
    • On Cloud: the card shows for paid plans only.
    • Self-hosted: the endpoint answers 404 and the card is hidden. With self-hosting we process no customer data, so there is no DPA.
  • Frontend:
    • license.dpaLink();
    • the card on /settings/license, with en/de/it messages;
    • the tab is opened before the request so popup blockers let it through, and closed again if the request fails.

Type

  • New feature

Testing

  • Added unit tests: license.service.spec.ts covers the payload and service token, the refused trial, and the site's error passed through.
  • packages/backend: npx jest --maxWorkers=2 src/license/license.service.spec.ts src/license/license.controller.spec.ts → 67/67 pass. npx tsc --noEmit -p tsconfig.json → clean. npx eslint on the changed files → clean.
  • packages/frontend:
    • npx tsc --noEmit -p tsconfig.json → clean;
    • npx eslint on the changed files → 3 warnings, all already in page.tsx (lines 89 and 97);
    • npx playwright test tests/e2e/dpa-link.spec.ts → 2/2 pass: a paid plan opens the stubbed link in a new tab with { locale: 'en' }, and a trial has no card.
  • The licence-site side was tested locally end to end; see fix(mcp-bridge): preserve the base URL path when calling a remote MCP server #502 on the website.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • This PR has a descriptive title

Related Issues

Relates to HelpCode-ai/anythingmcp-website#502. It must be deployed after that PR.

Paid Cloud workspaces get a card on the licence page that asks the
licence site for a one-hour link to its self-service DPA and opens it in
a new tab. The agreement, acceptance record, PDF and email all live on
the licence site; the backend only vouches, with the service token, for
the signed-in admin's own workspace key. Trials and self-hosted
installations see nothing (the endpoint answers 404 off Cloud).
@helpcodeai
helpcodeai enabled auto-merge (squash) November 4, 2026 14:04
@helpcodeai
helpcodeai merged commit e8f126c into main Nov 4, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the feat/dpa-self-service-link branch November 4, 2026 14:18
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant