security: enforce authenticated CRM contact ownership

This commit is contained in:
2026-11-05 06:49:00 +00:00
parent 601668a675
commit 2badf2e272
7 changed files with 517 additions and 126 deletions
+5 -2
View File
@@ -6,7 +6,10 @@ const vm = require("vm");
const tests = [];
const test = (name, fn) => tests.push({ name, fn });
const loadAuthInternals = ({ adapterFactory = () => ({}) } = {}) => {
const loadAuthInternals = ({
adapterFactory = () => ({}),
resolveCrmLocale = async () => null
} = {}) => {
const filePath = path.join(
__dirname,
"..",
@@ -56,7 +59,7 @@ const loadAuthInternals = ({ adapterFactory = () => ({}) } = {}) => {
},
NextAuth: () => ({}),
EmailProvider: () => ({}),
getPortalLogin: async () => ({ value: [] }),
resolveCrmLocale,
redactSensitive: (value) => value,
consoleLogger: () => {},
console: {