From 771498b817ec30902a0e1303bf7cc862abc0ca5e Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:38:48 +0100 Subject: [PATCH] Update inject-permission.ts --- backend/src/server/plugins/auth/inject-permission.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/src/server/plugins/auth/inject-permission.ts b/backend/src/server/plugins/auth/inject-permission.ts index b76c735f0..92fbfff1d 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,