mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: enforced temporary chat
This commit is contained in:
@@ -52,12 +52,19 @@
|
||||
prompts: false,
|
||||
tools: false
|
||||
},
|
||||
sharing: {
|
||||
public_models: false,
|
||||
public_knowledge: false,
|
||||
public_prompts: false,
|
||||
public_tools: false
|
||||
},
|
||||
chat: {
|
||||
controls: true,
|
||||
file_upload: true,
|
||||
delete: true,
|
||||
edit: true,
|
||||
temporary: true
|
||||
temporary: true,
|
||||
temporary_enforced: true
|
||||
},
|
||||
features: {
|
||||
web_search: true,
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
controls: true,
|
||||
delete: true,
|
||||
edit: true,
|
||||
file_upload: true,
|
||||
temporary: true,
|
||||
file_upload: true
|
||||
temporary_enforced: true
|
||||
},
|
||||
features: {
|
||||
web_search: true,
|
||||
@@ -277,6 +278,16 @@
|
||||
|
||||
<Switch bind:state={permissions.chat.temporary} />
|
||||
</div>
|
||||
|
||||
{#if permissions.chat.temporary}
|
||||
<div class=" flex w-full justify-between my-2 pr-2">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
{$i18n.t('Enforce Temporary Chat')}
|
||||
</div>
|
||||
|
||||
<Switch bind:state={permissions.chat.temporary_enforced} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
model: model
|
||||
}))}
|
||||
showTemporaryChatControl={$user.role === 'user'
|
||||
? ($user?.permissions?.chat?.temporary ?? true)
|
||||
? ($user?.permissions?.chat?.temporary ?? true) &&
|
||||
!($user?.permissions?.chat?.temporary_enforced ?? false)
|
||||
: true}
|
||||
bind:value={selectedModel}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user