refactor: scope tool export to tools the caller can write (#29310)

The bulk tool export returned every tool the caller could read, while the per-tool export path returns only what the caller can write. This aligns the two, matching how model export already scopes its query.

Callers still export their own tools and any tool shared with them for writing; admins running with BYPASS_ADMIN_ACCESS_CONTROL are unaffected.
This commit is contained in:
Classic298 2026-09-06 23:44:45 +02:00 committed by GitHub
parent f3eade42ae
commit 2e16a761ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -339,6 +339,7 @@ async def export_tools(
return await Tools.get_tools(
db=db,
user_id=None if bypass_access_control else user.id,
permission='write',
)