mirror of
https://github.com/open-webui/open-webui.git
synced 2026-04-28 02:19:29 +02:00
fix: enforce Allow Chat Valves permission in integrations menu (#20691)
- The "Allow Chat Valves" permission was only hiding valves in the Chat Controls sidebar, but users could still bypass this by accessing valves through the integrations menu in the chat input field. This fix adds the permission check to hide Valves buttons for both tools and filters/functions in the integrations menu.
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if filter?.has_user_valves}
|
||||
{#if filter?.has_user_valves && ($user?.role === 'admin' || ($user?.permissions?.chat?.valves ?? true))}
|
||||
<div class=" shrink-0">
|
||||
<Tooltip content={$i18n.t('Valves')}>
|
||||
<button
|
||||
@@ -371,7 +371,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if tools[toolId]?.has_user_valves}
|
||||
{#if tools[toolId]?.has_user_valves && ($user?.role === 'admin' || ($user?.permissions?.chat?.valves ?? true))}
|
||||
<div class=" shrink-0">
|
||||
<Tooltip content={$i18n.t('Valves')}>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user