From 539b7744915d856af14ab147c7daf517ca9aac85 Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 15 Apr 2026 22:08:27 -0500 Subject: [PATCH] fix(ci): align authz tests and e2e config --- server/src/routes/authz.ts | 3 ++- tests/e2e/playwright.config.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/routes/authz.ts b/server/src/routes/authz.ts index 2561609b80f..e2335a01ee8 100644 --- a/server/src/routes/authz.ts +++ b/server/src/routes/authz.ts @@ -49,7 +49,8 @@ export function assertCompanyAccess(req: Request, companyId: string) { if (!allowedCompanies.includes(companyId)) { throw forbidden("User does not have access to this company"); } - const isSafeMethod = ["GET", "HEAD", "OPTIONS"].includes(req.method.toUpperCase()); + const method = typeof req.method === "string" ? req.method.toUpperCase() : "GET"; + const isSafeMethod = ["GET", "HEAD", "OPTIONS"].includes(method); if (!isSafeMethod && Array.isArray(req.actor.memberships) && req.actor.memberships.length > 0) { const membership = req.actor.memberships.find((item) => item.companyId === companyId); if (membership?.status !== "active") { diff --git a/tests/e2e/playwright.config.ts b/tests/e2e/playwright.config.ts index 46579bc9c05..4f1c7206680 100644 --- a/tests/e2e/playwright.config.ts +++ b/tests/e2e/playwright.config.ts @@ -12,6 +12,9 @@ const PAPERCLIP_HOME = fs.mkdtempSync(path.join(os.tmpdir(), "paperclip-e2e-home export default defineConfig({ testDir: ".", testMatch: "**/*.spec.ts", + // These suites target dedicated multi-user configurations/ports and are + // intentionally not part of the default local_trusted e2e run. + testIgnore: ["multi-user.spec.ts", "multi-user-authenticated.spec.ts"], timeout: 60_000, retries: 0, use: {