[PR #22395] [CLOSED] fix: add missing has_access import in tools.py #42283

Closed
opened 2026-04-25 14:14:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22395
Author: @Tattooed-Geek
Created: 3/8/2026
Status: Closed

Base: mainHead: fix-22393-has-access-import


📝 Commits (1)

  • 7c266a0 fix: 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_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


🔄 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>
GiteaMirror added the pull-request label 2026-04-25 14:14:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42283