mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-10 22:43:29 +00:00
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:
parent
f3eade42ae
commit
2e16a761ee
1 changed files with 1 additions and 0 deletions
|
|
@ -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',
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue