fix(apps): preserve grant and approval defaults

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
DottaandCodex committed 2026-08-20 22:11:52 +00:00
1 parent fda25be6b1
commit 13dd4c1eae
12 files changed
+27 -15

No files matched your search

+3
View File
@@ -4585,6 +4585,7 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
})
.where(eq(toolConnections.id, existing.id))
.returning();
await ensureDefaultOrganizationGrant(updated);
await syncCredentialBindings(updated);
await ensureRuntimeSlot(updated);
return { row: updated, created: false };
@@ -4605,6 +4606,7 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
credentialRefs: [],
credentialSecretRefs: [],
}).returning();
await ensureDefaultOrganizationGrant(created);
await syncCredentialBindings(created);
await ensureRuntimeSlot(created);
return { row: created, created: true };
@@ -6568,6 +6570,7 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
createdByUserId: actor?.actorType === "user" ? actor.actorId ?? null : null,
}).returning();
}
await ensureDefaultOrganizationGrant(connectionRow);
await syncCredentialBindings(connectionRow);
await ensureRuntimeSlot(connectionRow);