[PR #22442] [CLOSED] fix: import missing has_access function in routers/tools.py #49747

Closed
opened 2026-04-30 02:03:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: devHead: fix/has_access_undefined


📝 Commits (1)

  • 42eed97 fix: import missing has_access function in routers/tools.py

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/open_webui/routers/tools.py (+1 -1)

📄 Description

Contributor License Agreement


Summary

The has_access function was being called on line 174 in routers/tools.py but was not imported, causing a NameError for non-admin users when accessing the /api/v1/tools/ endpoint.

Fix

Added has_access to the import statement from open_webui.utils.access_control.

Issue

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/22442 **Author:** [@gambletan](https://github.com/gambletan) **Created:** 3/8/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/has_access_undefined` --- ### 📝 Commits (1) - [`42eed97`](https://github.com/open-webui/open-webui/commit/42eed977d9595a499b9d6cebf02ee8217fc18316) fix: import missing has_access function in routers/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 ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- ## Summary The `has_access` function was being called on line 174 in `routers/tools.py` but was not imported, causing a `NameError` for non-admin users when accessing the `/api/v1/tools/` endpoint. ## Fix Added `has_access` to the import statement from `open_webui.utils.access_control`. ## Issue 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-30 02:03:28 -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#49747