Skip to content

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

feat: dashboard failing on failing check

=c6b21491db56
diff --git a/backend/src/services/secret-import/secret-import-service.ts b/backend/src/services/secret-import/secret-import-service.ts
index 571ae8b733..d21003b10f 100644
--- a/backend/src/services/secret-import/secret-import-service.ts
+++ b/backend/src/services/secret-import/secret-import-service.ts
@@ -819,10 +819,14 @@ export const secretImportServiceFactory = ({
actorOrgId,
actionProjectType: ActionProjectType.SecretManager
});
- ForbiddenError.from(permission).throwUnlessCan(
- ProjectPermissionActions.Read,
- subject(ProjectPermissionSub.SecretImports, { environment, secretPath })
- );
+ if (
+ permission.cannot(
+ ProjectPermissionActions.Read,
+ subject(ProjectPermissionSub.SecretImports, { environment, secretPath })
+ )
+ ) {
+ return [];
+ }
const folder = await folderDAL.findBySecretPath(projectId, environment, secretPath);
if (!folder) return [];