From 556e1cf92db3ba5200a8601a9baaf4a91308ada6 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sun, 19 Jul 2026 21:37:21 -0600 Subject: [PATCH] docs: trim block comment on assertGitProviderAccess --- packages/server/src/services/git-provider.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/server/src/services/git-provider.ts b/packages/server/src/services/git-provider.ts index 5a7c6f438..fad1e0a2f 100644 --- a/packages/server/src/services/git-provider.ts +++ b/packages/server/src/services/git-provider.ts @@ -120,13 +120,9 @@ export const getAccessibleGitProviderIds = async (session: { return result; }; -/** - * Authorizes read access to a specific git provider for the current session. - * Throws if the provider belongs to a different organization (cross-org IDOR) - * or if the caller is not entitled to it within the active organization. - * Must be called before returning any git-provider record that carries secrets - * (OAuth tokens, app private keys, webhook secrets). - */ +// Throws if the provider is in another organization (NOT_FOUND) or the caller +// is not entitled to it in the active org (FORBIDDEN). Call before returning any +// git-provider record that carries secrets. export const assertGitProviderAccess = async ( session: { userId: string; activeOrganizationId: string }, provider: { gitProviderId: string; organizationId: string },