From 2c01d59335e961d635e70c58ea5fdde2f5a8c607 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 13 Aug 2026 17:26:38 -0600 Subject: [PATCH] refac --- backend/open_webui/routers/automations.py | 10 +++------- src/lib/components/admin/Evaluations/Feedbacks.svelte | 9 ++++----- src/lib/components/admin/Users/Groups.svelte | 9 ++++----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/backend/open_webui/routers/automations.py b/backend/open_webui/routers/automations.py index 8039a61e24..caf8879e28 100644 --- a/backend/open_webui/routers/automations.py +++ b/backend/open_webui/routers/automations.py @@ -15,7 +15,7 @@ from open_webui.models.automations import ( AutomationRuns, Automations, ) -from open_webui.models.access_grants import AccessGrants +from open_webui.models.access_grants import AccessGrants, has_public_write_access_grant from open_webui.models.channels import Channels from open_webui.models.config import Config from open_webui.models.folders import Folders @@ -134,12 +134,8 @@ async def check_automation_channel_access(form_data: AutomationForm, user, db: A if channel.type in ['group', 'dm']: allowed = await Channels.is_user_channel_member(channel.id, user.id, db=db) else: - allowed = await AccessGrants.has_access( - user_id=user.id, - resource_type='channel', - resource_id=channel.id, - permission='write', - db=db, + allowed = has_public_write_access_grant(channel.access_grants) or await AccessGrants.has_access( + user_id=user.id, resource_type='channel', resource_id=channel.id, permission='write', db=db ) if not allowed: raise HTTPException( diff --git a/src/lib/components/admin/Evaluations/Feedbacks.svelte b/src/lib/components/admin/Evaluations/Feedbacks.svelte index b61d65e1a8..d9bade0b7e 100644 --- a/src/lib/components/admin/Evaluations/Feedbacks.svelte +++ b/src/lib/components/admin/Evaluations/Feedbacks.svelte @@ -304,11 +304,10 @@
{#if (items ?? []).length === 0} -
-
-
😕
-
{$i18n.t('No feedback found')}
-
+
+
+
{$i18n.t('No feedback found')}
+
{$i18n.t('Try adjusting your search or filter to find what you are looking for.')}
diff --git a/src/lib/components/admin/Users/Groups.svelte b/src/lib/components/admin/Users/Groups.svelte index 843da668f2..d4301a49c7 100644 --- a/src/lib/components/admin/Users/Groups.svelte +++ b/src/lib/components/admin/Users/Groups.svelte @@ -184,11 +184,10 @@ {/each}
{:else} -
-
-
👥
-
{$i18n.t('No groups found')}
-
+
+
+
{$i18n.t('No groups found')}
+
{$i18n.t('Use groups to organize your users and assign permissions.')}