Skip to content

Commit 2751a0f

Browse files
committed
refac
1 parent a9e9fe7 commit 2751a0f

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

backend/open_webui/utils/access_control/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def has_connection_access(
163163
based on ``config.access_grants`` within the connection dict.
164164
165165
- Admin with BYPASS_ADMIN_ACCESS_CONTROL → always allowed
166-
- Empty / missing access_grants → allowed for all users
167-
- Otherwise → delegates to ``has_access``
166+
- Missing, None, or empty access_grants → private, admin-only
167+
- access_grants has entries → delegates to ``has_access``
168168
"""
169169
from open_webui.config import BYPASS_ADMIN_ACCESS_CONTROL
170170

@@ -175,9 +175,6 @@ def has_connection_access(
175175
user_group_ids = {group.id for group in Groups.get_groups_by_member_id(user.id)}
176176

177177
access_grants = (connection.get("config") or {}).get("access_grants", [])
178-
if not access_grants:
179-
return True
180-
181178
return has_access(user.id, "read", access_grants, user_group_ids)
182179

183180

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-webui",
3-
"version": "0.8.6",
3+
"version": "0.8.7",
44
"private": true,
55
"scripts": {
66
"dev": "npm run pyodide:fetch && vite dev --host",

0 commit comments

Comments
 (0)