fix(ci): align authz tests and e2e config

This commit is contained in:
Dotta committed 2026-04-15 22:08:27 -05:00
1 parent ea7066709b
commit 539b774491
2 files changed
+5 -1

No files matched your search

+2 -1
View File
@@ -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") {
+3
View File
@@ -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: {