mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #23631] [MERGED] fix: enforce model access control on Ollama generate, show, embed, embeddings endpoints #50337
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/23631
Author: @Classic298
Created: 4/12/2026
Status: ✅ Merged
Merged: 4/12/2026
Merged by: @tjbck
Base:
dev← Head:fix/ollama-model-access-control📝 Commits (1)
8d155d1fix: enforce model access control on Ollama generate, show, embed, embeddings endpoints📊 Changes
1 file changed (+15 additions, -2 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+15 -2)📄 Description
These four endpoints checked model existence but never verified the user has read access via AccessGrants, allowing any authenticated user to use restricted models.
Adds _verify_model_access helper mirroring the /api/chat access control pattern and applies it to /api/show, /api/embed, /api/embeddings, and /api/generate.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.