The has_access function was used in routers/tools.py but was not imported from utils.access_control. This caused a NameError: name 'has_access' is not defined when the tools router was accessed.
Changes
Added missing import: from utils.access_control import has_access in backend/open_webui/routers/tools.py
🔄 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/22395
**Author:** [@Tattooed-Geek](https://github.com/Tattooed-Geek)
**Created:** 3/8/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix-22393-has-access-import`
---
### 📝 Commits (1)
- [`7c266a0`](https://github.com/open-webui/open-webui/commit/7c266a04773d7b563ade3b46767d834b5c2d9848) fix: add missing has_access import in tools.py
### 📊 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
Fixes #22393
The `has_access` function was used in `routers/tools.py` but was not imported from `utils.access_control`. This caused a `NameError: name 'has_access' is not defined` when the tools router was accessed.
## Changes
- Added missing import: `from utils.access_control import has_access` in `backend/open_webui/routers/tools.py`
## Testing
- Verified the import resolves the NameError
- No functional changes, only missing import fix
Fixes #22393
---
<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/22395
Author: @Tattooed-Geek
Created: 3/8/2026
Status: ❌ Closed
Base:
main← Head:fix-22393-has-access-import📝 Commits (1)
7c266a0fix: add missing has_access import in tools.py📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/tools.py(+1 -1)📄 Description
Summary
Fixes #22393
The
has_accessfunction was used inrouters/tools.pybut was not imported fromutils.access_control. This caused aNameError: name 'has_access' is not definedwhen the tools router was accessed.Changes
from utils.access_control import has_accessinbackend/open_webui/routers/tools.pyTesting
Fixes #22393
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.