Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web-backend): use org-aware writable storage when creating videos

Richie McIlroy3899d5e7b6db
diff --git a/packages/web-backend/src/Videos/index.ts b/packages/web-backend/src/Videos/index.ts
index 3ee88bec9..1bd9d5c3a 100644
--- a/packages/web-backend/src/Videos/index.ts
+++ b/packages/web-backend/src/Videos/index.ts
@@ -377,7 +377,10 @@ export class Videos extends Effect.Service<Videos>()("Videos", {
if (user.activeOrganizationId !== input.orgId)
return yield* Effect.fail(new Policy.PolicyDeniedError());
- const writable = yield* storage.getWritableAccessForUser(user.id);
+ const writable = yield* storage.getWritableAccessForUser(
+ user.id,
+ input.orgId,
+ );
const bucketId: RepoCreateVideoInput["bucketId"] = writable.bucketId;
const storageIntegrationId: RepoCreateVideoInput["storageIntegrationId"] =
writable.storageIntegrationId;