Skip to content

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

fix: correct app connection service org permission check arguement order

Scott Wilsonc126a810d749
diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.ts
index 19d66b9fd8..a3841e68ae 100644
--- a/backend/src/services/app-connection/app-connection-service.ts
+++ b/backend/src/services/app-connection/app-connection-service.ts
@@ -266,9 +266,9 @@ export const appConnectionServiceFactory = ({
const { permission } = await permissionService.getOrgPermission(
actor.type,
actor.id,
- actor.orgId,
+ appConnection.orgId,
actor.authMethod,
- appConnection.orgId
+ actor.orgId
);
ForbiddenError.from(permission).throwUnlessCan(
@@ -316,9 +316,9 @@ export const appConnectionServiceFactory = ({
const { permission } = await permissionService.getOrgPermission(
actor.type,
actor.id,
- actor.orgId,
+ appConnection.orgId,
actor.authMethod,
- appConnection.orgId
+ actor.orgId
);
ForbiddenError.from(permission).throwUnlessCan(
@@ -475,9 +475,9 @@ export const appConnectionServiceFactory = ({
const { permission: orgPermission } = await permissionService.getOrgPermission(
actor.type,
actor.id,
- actor.orgId,
+ appConnection.orgId,
actor.authMethod,
- appConnection.orgId
+ actor.orgId
);
if (appConnection.projectId) {
@@ -633,9 +633,9 @@ export const appConnectionServiceFactory = ({
const { permission } = await permissionService.getOrgPermission(
actor.type,
actor.id,
- actor.orgId,
+ appConnection.orgId,
actor.authMethod,
- appConnection.orgId
+ actor.orgId
);
ForbiddenError.from(permission).throwUnlessCan(
@@ -803,9 +803,9 @@ export const appConnectionServiceFactory = ({
const { permission } = await permissionService.getOrgPermission(
actor.type,
actor.id,
- actor.orgId,
+ appConnection.orgId,
actor.authMethod,
- appConnection.orgId
+ actor.orgId
);
ForbiddenError.from(permission).throwUnlessCan(