mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #16498] [MERGED] fix: Chat model selector bypasses ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS privacy setting #39780
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/16498
Author: @Classic298
Created: 8/11/2025
Status: ✅ Merged
Merged: 8/13/2025
Merged by: @tjbck
Base:
dev← Head:fix_model_access📝 Commits (5)
d8c4dd6Fix admin model access (#17)357b57eUpdate models.pyf758bf7Update main.pydf314fdUpdate main.py8a745b9Merge branch 'dev' into fix_model_access📊 Changes
2 files changed (+9 additions, -8 deletions)
View changed files
📝
backend/open_webui/main.py(+8 -7)📝
backend/open_webui/routers/models.py(+1 -1)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Fixes a critical privacy bug where private models were still visible and usable in the chat model selector for administrators when
ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS=false. This ensures complete and consistent enforcement of the admin workspace privacy control across all model types.Added
Changed
get_filtered_models()inmain.pyto respect admin workspace access settings when filtering models for chat interfaceget_model_by_id()inrouters/models.pyto check admin workspace access permissions for individual model accessDeprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Root Cause Analysis:
The issue was in the main model filtering function (
get_filtered_models()inmain.py) which was not checking theENABLE_ADMIN_WORKSPACE_CONTENT_ACCESSsetting when determining admin access to models. This caused private models to appear in the chat model selector even when admins should not have access.Technical Details:
get_filtered_models()which gave admins blanket access regardless of the workspace privacy settingBehavior:
When
ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS=false:Testing Performed:
ENABLE_ADMIN_WORKSPACE_CONTENT_ACCESS=falseDesign Philosophy:
This implementation follows the principle of least privilege - when workspace privacy is disabled, admins follow the same access control rules as regular users for content consumption, while maintaining full infrastructure management capabilities in the admin panel.
Related Issues:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.