Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Update inject-permission.ts

Daniel Hougaard771498b817ec
diff --git a/backend/src/server/plugins/auth/inject-permission.ts b/backend/src/server/plugins/auth/inject-permission.ts
index b76c735f02..92fbfff1d1 100644
--- a/backend/src/server/plugins/auth/inject-permission.ts
+++ b/backend/src/server/plugins/auth/inject-permission.ts
@@ -8,10 +8,6 @@ export const injectPermission = fp(async (server) => {
server.addHook("onRequest", async (req) => {
if (!req.auth) return;
- // if (!req.auth.authMethod) {
- // throw new Error("THIS SHOULD NOT HAPPEN");
- // }
-
if (req.auth.actor === ActorType.USER) {
req.permission = {
type: ActorType.USER,