From 1944414feb5649695ee1eb4261db5cabc92bf1f1 Mon Sep 17 00:00:00 2001 From: Hugues Chocart Date: Fri, 30 Aug 2024 19:23:28 +0100 Subject: [PATCH] fix: saml acs (#524) --- packages/backend/src/api/v1/auth/saml.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/backend/src/api/v1/auth/saml.ts b/packages/backend/src/api/v1/auth/saml.ts index 7e112e1a..de3312cc 100644 --- a/packages/backend/src/api/v1/auth/saml.ts +++ b/packages/backend/src/api/v1/auth/saml.ts @@ -166,12 +166,6 @@ route.post("/download-idp-xml", aggressiveRatelimit, async (ctx: Context) => { // Assertion Consumer Service route.post("/acs", async (ctx: Context) => { const { orgId } = ctx.params as { orgId: string } - const { userId } = ctx.state - - const [user] = await sql`select * from account where id = ${userId}` - if (user?.orgId !== orgId) { - ctx.throw(403, "Forbidden: Insufficient permissions") - } const idp = await getOrgIdp(orgId) const sp = await getOrgSp(orgId)