The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update can-install-oauth-app.ts
Kiran K2de7ea5b2bfc
diff --git a/apps/web/lib/api/oauth/can-install-oauth-app.ts b/apps/web/lib/api/oauth/can-install-oauth-app.tsindex 4f7ad44489..95964e8bc0 100644--- a/apps/web/lib/api/oauth/can-install-oauth-app.ts+++ b/apps/web/lib/api/oauth/can-install-oauth-app.ts@@ -14,14 +14,17 @@ export const canInstallOAuthApp = ({workspace: Pick<WorkspaceProps, "id">;userId: string;}): boolean => {+ // Verified apps can be installed on any workspace.if (integration.verified) {return true;}+ // The app creator can install on any workspace they belong to (e.g. for testing).if (integration.userId && integration.userId === userId) {return true;}+ // Otherwise only the workspace that owns the app can install it.return (normalizeWorkspaceId(workspace.id) ===normalizeWorkspaceId(integration.projectId)