mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-28 15:29:21 +00:00
Update inject-permission.ts
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user