+
+
-
-
- {$i18n.t('Allow File Upload')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Chat Controls')}
-
-
-
-
-
- {#if permissions.chat.controls}
-
-
- {$i18n.t('Allow Chat Valves')}
+ {#if permissions.chat.controls}
+
+ {/if}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- {$i18n.t('Allow Chat System Prompt')}
+ {#if permissions.chat.temporary}
+
-
-
-
-
-
-
- {$i18n.t('Allow Chat Params')}
-
-
-
-
- {/if}
-
-
-
- {$i18n.t('Allow Chat Edit')}
-
-
-
+ {/if}
-
-
-
- {$i18n.t('Allow Chat Delete')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Delete Messages')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Continue Response')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Regenerate Response')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Rate Response')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Chat Share')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Chat Export')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Speech to Text')}
-
-
-
-
-
-
- {$i18n.t('Allow Text to Speech')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Call')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Multiple Models in Chat')}
-
-
-
-
-
-
-
- {$i18n.t('Allow Temporary Chat')}
-
-
-
-
-
- {#if permissions.chat.temporary}
-
-
- {$i18n.t('Enforce Temporary Chat')}
-
-
-
-
- {/if}
-
+
{$i18n.t('Features Permissions')}
-
-
-
- {$i18n.t('Direct Tool Servers')}
-
-
-
-
-
-
-
- {$i18n.t('Web Search')}
-
-
-
-
-
-
-
- {$i18n.t('Image Generation')}
-
-
-
-
-
-
-
- {$i18n.t('Code Interpreter')}
-
-
-
-
-
-
-
- {$i18n.t('Notes')}
-
-
-
+
-
+
\ No newline at end of file
diff --git a/src/lib/components/common/Warning.svelte b/src/lib/components/common/Warning.svelte
new file mode 100644
index 0000000000..85f60ff851
--- /dev/null
+++ b/src/lib/components/common/Warning.svelte
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/src/lib/components/icons/ExclamationTriangle.svelte b/src/lib/components/icons/ExclamationTriangle.svelte
new file mode 100644
index 0000000000..256e4a7be4
--- /dev/null
+++ b/src/lib/components/icons/ExclamationTriangle.svelte
@@ -0,0 +1,26 @@
+
+
+
+
+
\ No newline at end of file
From fb3eeaa12662cf89c1efc8e116d622b50a1e3677 Mon Sep 17 00:00:00 2001
From: Classic298 <27028174+Classic298@users.noreply.github.com>
Date: Sun, 28 Sep 2025 16:56:04 +0200
Subject: [PATCH 2/6] Update Groups.svelte
---
src/lib/components/admin/Users/Groups.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/components/admin/Users/Groups.svelte b/src/lib/components/admin/Users/Groups.svelte
index 2e8255eae8..7ac9a6eba1 100644
--- a/src/lib/components/admin/Users/Groups.svelte
+++ b/src/lib/components/admin/Users/Groups.svelte
@@ -24,7 +24,7 @@
import GroupItem from './Groups/GroupItem.svelte';
import AddGroupModal from './Groups/AddGroupModal.svelte';
import { createNewGroup, getGroups } from '$lib/apis/groups';
- import { getAllUsers, updateUserDefaultPermissions } from '$lib/apis/users';
+ import { getUserDefaultPermissions, getAllUsers, updateUserDefaultPermissions } from '$lib/apis/users';
const i18n = getContext('i18n');
From a4e0c10f344ccaf5726f6dadcf3cdbd400ed2673 Mon Sep 17 00:00:00 2001
From: Classic298 <27028174+Classic298@users.noreply.github.com>
Date: Sun, 28 Sep 2025 21:27:06 +0200
Subject: [PATCH 3/6] Delete
src/lib/components/admin/Users/Groups/PermissionSwitch.svelte
---
.../Users/Groups/PermissionSwitch.svelte | 38 -------------------
1 file changed, 38 deletions(-)
delete mode 100644 src/lib/components/admin/Users/Groups/PermissionSwitch.svelte
diff --git a/src/lib/components/admin/Users/Groups/PermissionSwitch.svelte b/src/lib/components/admin/Users/Groups/PermissionSwitch.svelte
deleted file mode 100644
index 71958d1059..0000000000
--- a/src/lib/components/admin/Users/Groups/PermissionSwitch.svelte
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
- {#if tooltip}
-
-
- {label}
-
-
-
- {:else}
-
- {/if}
- {#if defaultState && !state}
-
-
-
- {/if}
-
\ No newline at end of file
From ad9cae32dc3df80f6206d5c01032bfbb1ec6963d Mon Sep 17 00:00:00 2001
From: Classic298 <27028174+Classic298@users.noreply.github.com>
Date: Sun, 28 Sep 2025 21:27:20 +0200
Subject: [PATCH 4/6] Delete
src/lib/components/icons/ExclamationTriangle.svelte
---
.../icons/ExclamationTriangle.svelte | 26 -------------------
1 file changed, 26 deletions(-)
delete mode 100644 src/lib/components/icons/ExclamationTriangle.svelte
diff --git a/src/lib/components/icons/ExclamationTriangle.svelte b/src/lib/components/icons/ExclamationTriangle.svelte
deleted file mode 100644
index 256e4a7be4..0000000000
--- a/src/lib/components/icons/ExclamationTriangle.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
\ No newline at end of file
From 67b39299541d5f242afa4a45f17bf0cf5c47e3bc Mon Sep 17 00:00:00 2001
From: Classic298 <27028174+Classic298@users.noreply.github.com>
Date: Sun, 28 Sep 2025 21:27:31 +0200
Subject: [PATCH 5/6] Delete src/lib/components/common/Warning.svelte
---
src/lib/components/common/Warning.svelte | 9 ---------
1 file changed, 9 deletions(-)
delete mode 100644 src/lib/components/common/Warning.svelte
diff --git a/src/lib/components/common/Warning.svelte b/src/lib/components/common/Warning.svelte
deleted file mode 100644
index 85f60ff851..0000000000
--- a/src/lib/components/common/Warning.svelte
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
From cf20f04bdce27233028b89db4b30f8db043e4c6c Mon Sep 17 00:00:00 2001
From: Classic298 <27028174+Classic298@users.noreply.github.com>
Date: Sun, 28 Sep 2025 21:33:40 +0200
Subject: [PATCH 6/6] Update Permissions.svelte
---
.../admin/Users/Groups/Permissions.svelte | 709 +++++++++++++-----
1 file changed, 530 insertions(+), 179 deletions(-)
diff --git a/src/lib/components/admin/Users/Groups/Permissions.svelte b/src/lib/components/admin/Users/Groups/Permissions.svelte
index 3663960d86..dfba887fd4 100644
--- a/src/lib/components/admin/Users/Groups/Permissions.svelte
+++ b/src/lib/components/admin/Users/Groups/Permissions.svelte
@@ -2,8 +2,8 @@
import { getContext, onMount } from 'svelte';
const i18n = getContext('i18n');
+ import Switch from '$lib/components/common/Switch.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
- import PermissionSwitch from './PermissionSwitch.svelte';
// Default values for permissions
const DEFAULT_PERMISSIONS = {
@@ -77,30 +77,75 @@
{$i18n.t('Workspace Permissions')}
-
-
-
-
-
+
+
+ {$i18n.t('Models Access')}
+
+
+
+ {#if defaultPermissions?.workspace?.models && !permissions.workspace.models}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Knowledge Access')}
+
+
+
+ {#if defaultPermissions?.workspace?.knowledge && !permissions.workspace.knowledge}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Prompts Access')}
+
+
+
+ {#if defaultPermissions?.workspace?.prompts && !permissions.workspace.prompts}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+ placement="top-start"
+ >
+
+ {$i18n.t('Tools Access')}
+
+
+
+ {#if defaultPermissions?.workspace?.tools && !permissions.workspace.tools}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
@@ -108,32 +153,85 @@
{$i18n.t('Sharing Permissions')}
-
-
-
-
-
-
+
+
+
+
+ {$i18n.t('Models Public Sharing')}
+
+
+
+ {#if defaultPermissions?.sharing?.public_models && !permissions.sharing.public_models}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Knowledge Public Sharing')}
+
+
+
+ {#if defaultPermissions?.sharing?.public_knowledge && !permissions.sharing.public_knowledge}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Prompts Public Sharing')}
+
+
+
+ {#if defaultPermissions?.sharing?.public_prompts && !permissions.sharing.public_prompts}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Tools Public Sharing')}
+
+
+
+ {#if defaultPermissions?.sharing?.public_tools && !permissions.sharing.public_tools}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Notes Public Sharing')}
+
+
+
+ {#if defaultPermissions?.sharing?.public_notes && !permissions.sharing.public_notes}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
@@ -141,146 +239,399 @@
{$i18n.t('Chat Permissions')}
-
-
-
- {#if permissions.chat.controls}
-
-
-
-
+
+
+
+ {$i18n.t('Allow File Upload')}
- {/if}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#if permissions.chat.temporary}
-
+ {#if defaultPermissions?.chat?.file_upload && !permissions.chat.file_upload}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
{/if}
+
+
+
+
+ {$i18n.t('Allow Chat Controls')}
+
+
+
+ {#if defaultPermissions?.chat?.controls && !permissions.chat.controls}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+ {#if permissions.chat.controls}
+
+
+
+ {$i18n.t('Allow Chat Valves')}
+
+
+
+ {#if defaultPermissions?.chat?.valves && !permissions.chat.valves}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Chat System Prompt')}
+
+
+
+ {#if defaultPermissions?.chat?.system_prompt && !permissions.chat.system_prompt}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Chat Params')}
+
+
+
+ {#if defaultPermissions?.chat?.params && !permissions.chat.params}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+ {/if}
+
+
+
+
+ {$i18n.t('Allow Chat Edit')}
+
+
+
+ {#if defaultPermissions?.chat?.edit && !permissions.chat.edit}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Chat Delete')}
+
+
+
+ {#if defaultPermissions?.chat?.delete && !permissions.chat.delete}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Delete Messages')}
+
+
+
+ {#if defaultPermissions?.chat?.delete_message && !permissions.chat.delete_message}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Continue Response')}
+
+
+
+ {#if defaultPermissions?.chat?.continue_response && !permissions.chat.continue_response}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Regenerate Response')}
+
+
+
+ {#if defaultPermissions?.chat?.regenerate_response && !permissions.chat.regenerate_response}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Rate Response')}
+
+
+
+ {#if defaultPermissions?.chat?.rate_response && !permissions.chat.rate_response}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Chat Share')}
+
+
+
+ {#if defaultPermissions?.chat?.share && !permissions.chat.share}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Chat Export')}
+
+
+
+ {#if defaultPermissions?.chat?.export && !permissions.chat.export}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Speech to Text')}
+
+
+
+ {#if defaultPermissions?.chat?.stt && !permissions.chat.stt}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Text to Speech')}
+
+
+
+ {#if defaultPermissions?.chat?.tts && !permissions.chat.tts}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Call')}
+
+
+
+ {#if defaultPermissions?.chat?.call && !permissions.chat.call}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Multiple Models in Chat')}
+
+
+
+ {#if defaultPermissions?.chat?.multiple_models && !permissions.chat.multiple_models}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Allow Temporary Chat')}
+
+
+
+ {#if defaultPermissions?.chat?.temporary && !permissions.chat.temporary}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+ {#if permissions.chat.temporary}
+
+
+
+ {$i18n.t('Enforce Temporary Chat')}
+
+
+
+ {#if defaultPermissions?.chat?.temporary_enforced && !permissions.chat.temporary_enforced}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+ {/if}
{$i18n.t('Features Permissions')}
-
-
-
-
-
-
+
+
+
+
+ {$i18n.t('Direct Tool Servers')}
+
+
+
+ {#if defaultPermissions?.features?.direct_tool_servers && !permissions.features.direct_tool_servers}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Web Search')}
+
+
+
+ {#if defaultPermissions?.features?.web_search && !permissions.features.web_search}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Image Generation')}
+
+
+
+ {#if defaultPermissions?.features?.image_generation && !permissions.features.image_generation}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Code Interpreter')}
+
+
+
+ {#if defaultPermissions?.features?.code_interpreter && !permissions.features.code_interpreter}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
+
+
+
+
+
+ {$i18n.t('Notes')}
+
+
+
+ {#if defaultPermissions?.features?.notes && !permissions.features.notes}
+
+
+ ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')}
+
+
+ {/if}
-
\ No newline at end of file
+