This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-13 17:26:38 -06:00
1 parent 7593698080
commit 2c01d59335
3 files changed
+11 -17

No files matched your search

+3 -7
View File
@@ -15,7 +15,7 @@ from open_webui.models.automations import (
AutomationRuns, AutomationRuns,
Automations, 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.channels import Channels
from open_webui.models.config import Config from open_webui.models.config import Config
from open_webui.models.folders import Folders 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']: if channel.type in ['group', 'dm']:
allowed = await Channels.is_user_channel_member(channel.id, user.id, db=db) allowed = await Channels.is_user_channel_member(channel.id, user.id, db=db)
else: else:
allowed = await AccessGrants.has_access( allowed = has_public_write_access_grant(channel.access_grants) or await AccessGrants.has_access(
user_id=user.id, user_id=user.id, resource_type='channel', resource_id=channel.id, permission='write', db=db
resource_type='channel',
resource_id=channel.id,
permission='write',
db=db,
) )
if not allowed: if not allowed:
raise HTTPException( raise HTTPException(
@@ -304,11 +304,10 @@
<div class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full"> <div class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full">
{#if (items ?? []).length === 0} {#if (items ?? []).length === 0}
<div class="w-full h-full flex flex-col justify-center items-center my-16 mb-24"> <div class="flex w-full flex-col items-center justify-center py-16 pb-24">
<div class="max-w-md text-center"> <div class="max-w-sm text-center text-gray-900 dark:text-gray-100">
<div class="text-3xl mb-3">😕</div> <div class="mb-1.5 text-sm">{$i18n.t('No feedback found')}</div>
<div class="text-lg font-normal mb-1">{$i18n.t('No feedback found')}</div> <div class="text-center text-xs leading-5 text-gray-500">
<div class="text-gray-500 text-center text-xs">
{$i18n.t('Try adjusting your search or filter to find what you are looking for.')} {$i18n.t('Try adjusting your search or filter to find what you are looking for.')}
</div> </div>
</div> </div>
+4 -5
View File
@@ -184,11 +184,10 @@
{/each} {/each}
</div> </div>
{:else} {:else}
<div class="w-full h-full flex flex-col justify-center items-center my-16 mb-24"> <div class="flex w-full flex-col items-center justify-center py-16 pb-24">
<div class="max-w-md text-center"> <div class="max-w-sm text-center text-gray-900 dark:text-gray-100">
<div class="text-3xl mb-3">👥</div> <div class="mb-1.5 text-sm">{$i18n.t('No groups found')}</div>
<div class="text-lg font-normal mb-1">{$i18n.t('No groups found')}</div> <div class="text-center text-xs leading-5 text-gray-500">
<div class="text-gray-500 text-center text-xs">
{$i18n.t('Use groups to organize your users and assign permissions.')} {$i18n.t('Use groups to organize your users and assign permissions.')}
</div> </div>
</div> </div>