8851d38 fix: add missing has_access import in tools router
📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝backend/open_webui/routers/tools.py (+1 -1)
📄 Description
Summary
Adds the missing has_access import from open_webui.utils.access_control in backend/open_webui/routers/tools.py
Without this import, the get_tools endpoint raises NameError: name 'has_access' is not defined for all non-admin users, returning HTTP 500 and hiding all tools
The function is called on line 174 when filtering tool access for non-admin users with server-type tools
Log in as a non-admin user and verify GET /api/v1/tools/ returns 200 with the correct tool list
Log in as an admin user and verify tools still load correctly
Verify server-type tools with access grants are correctly filtered for non-admin users
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/22409
**Author:** [@gambletan](https://github.com/gambletan)
**Created:** 3/8/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/missing-has-access-import`
---
### 📝 Commits (1)
- [`8851d38`](https://github.com/open-webui/open-webui/commit/8851d384bad24bf039f931ec5115f090ac415d10) fix: add missing `has_access` import in tools router
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/tools.py` (+1 -1)
</details>
### 📄 Description
## Summary
- Adds the missing `has_access` import from `open_webui.utils.access_control` in `backend/open_webui/routers/tools.py`
- Without this import, the `get_tools` endpoint raises `NameError: name 'has_access' is not defined` for all non-admin users, returning HTTP 500 and hiding all tools
- The function is called on line 174 when filtering tool access for non-admin users with server-type tools
Fixes #22393
## Test plan
- [ ] Log in as a non-admin user and verify GET /api/v1/tools/ returns 200 with the correct tool list
- [ ] Log in as an admin user and verify tools still load correctly
- [ ] Verify server-type tools with access grants are correctly filtered for non-admin users
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22409
Author: @gambletan
Created: 3/8/2026
Status: ❌ Closed
Base:
main← Head:fix/missing-has-access-import📝 Commits (1)
8851d38fix: add missinghas_accessimport in tools router📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/tools.py(+1 -1)📄 Description
Summary
has_accessimport fromopen_webui.utils.access_controlinbackend/open_webui/routers/tools.pyget_toolsendpoint raisesNameError: name 'has_access' is not definedfor all non-admin users, returning HTTP 500 and hiding all toolsFixes #22393
Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.