Skip to content

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

check orgId

Matheus Nogueiraeacf67bd54ab
diff --git a/backend/src/server/routes/v1/admin-router.ts b/backend/src/server/routes/v1/admin-router.ts
index 5804fe750f..bdf2892bb1 100644
--- a/backend/src/server/routes/v1/admin-router.ts
+++ b/backend/src/server/routes/v1/admin-router.ts
@@ -93,8 +93,9 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
const orgId = req.auth?.orgId ?? "";
const latestAvailableVersion = await server.services.updateCheck.getAvailableUpdateVersion();
- const isCrossProjectSecretSharingEnabled =
- await server.services.crossProjectSecretSharingService.canUseCrossProjectSecretSharing(orgId);
+ const isCrossProjectSecretSharingEnabled = orgId
+ ? await server.services.crossProjectSecretSharingService.canUseCrossProjectSecretSharing(orgId)
+ : false;
if (!isSuperAdminUser) {
// Only return fields the frontend needs before authentication