mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 04:26:33 +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) => {
|
server.addHook("onRequest", async (req) => {
|
||||||
if (!req.auth) return;
|
if (!req.auth) return;
|
||||||
|
|
||||||
// if (!req.auth.authMethod) {
|
|
||||||
// throw new Error("THIS SHOULD NOT HAPPEN");
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (req.auth.actor === ActorType.USER) {
|
if (req.auth.actor === ActorType.USER) {
|
||||||
req.permission = {
|
req.permission = {
|
||||||
type: ActorType.USER,
|
type: ActorType.USER,
|
||||||
|
|||||||
Reference in New Issue
Block a user