Skip to content

Scheduling infrastructure for absolutely everyone.

fix: prevent cross-team app visibility in organizations (#23085)

Anik Dhabal Babud9817fcb0791
diff --git a/packages/lib/getConnectedApps.ts b/packages/lib/getConnectedApps.ts
index 5e8454a8e65..09567d64283 100644
--- a/packages/lib/getConnectedApps.ts
+++ b/packages/lib/getConnectedApps.ts
@@ -72,6 +72,7 @@ export async function getConnectedApps({
if (includeTeamInstalledApps || teamId) {
const teamsQuery = await prisma.team.findMany({
where: {
+ ...(teamId ? { id: teamId } : {}),
members: {
some: {
userId: user.id,