This commit is contained in:
Timothy Jaeryang Baek
2026-03-22 06:58:58 -05:00
parent 2e165926de
commit 945275faae
5 changed files with 56 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ from open_webui.models.users import UserModel
from open_webui.models.groups import Groups
from open_webui.models.access_grants import (
has_public_read_access_grant,
has_public_write_access_grant,
has_user_access_grant,
strip_user_access_grants,
)
@@ -225,7 +226,7 @@ def filter_allowed_access_grants(
return access_grants
# Check if user can share publicly
if has_public_read_access_grant(access_grants) and not has_permission(
if (has_public_read_access_grant(access_grants) or has_public_write_access_grant(access_grants)) and not has_permission(
user_id,
public_permission_key,
default_permissions,