mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 22:28:15 +00:00
Update inject-permission.ts
This commit is contained in:
@@ -12,8 +12,8 @@ export const injectPermission = fp(async (server) => {
|
|||||||
req.permission = {
|
req.permission = {
|
||||||
type: ActorType.USER,
|
type: ActorType.USER,
|
||||||
id: req.auth.userId,
|
id: req.auth.userId,
|
||||||
orgId: req.auth.orgId,
|
orgId: req.auth.orgId, // if the req.auth.authMode is AuthMode.API_KEY, the orgId will be "API_KEY"
|
||||||
authMethod: req.auth.authMethod
|
authMethod: req.auth.authMethod // if the req.auth.authMode is AuthMode.API_KEY, the authMethod will be null
|
||||||
};
|
};
|
||||||
} else if (req.auth.actor === ActorType.IDENTITY) {
|
} else if (req.auth.actor === ActorType.IDENTITY) {
|
||||||
req.permission = {
|
req.permission = {
|
||||||
|
|||||||
Reference in New Issue
Block a user