From 8656bfc5f4d8f6e2d7749b514473981de8bf4616 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 29 Sep 2025 00:03:03 -0500 Subject: [PATCH] refac --- .../admin/Users/Groups/Permissions.svelte | 272 +++++++++--------- 1 file changed, 136 insertions(+), 136 deletions(-) diff --git a/src/lib/components/admin/Users/Groups/Permissions.svelte b/src/lib/components/admin/Users/Groups/Permissions.svelte index dfba887fd4..c020c7c683 100644 --- a/src/lib/components/admin/Users/Groups/Permissions.svelte +++ b/src/lib/components/admin/Users/Groups/Permissions.svelte @@ -79,48 +79,48 @@
{$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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if} @@ -128,7 +128,7 @@
{#if defaultPermissions?.workspace?.tools && !permissions.workspace.tools} -
-
- ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if} @@ -155,80 +155,80 @@
{$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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if} @@ -241,81 +241,81 @@
{$i18n.t('Chat Permissions')}
-
+
{$i18n.t('Allow File Upload')}
{#if defaultPermissions?.chat?.file_upload && !permissions.chat.file_upload} -
-
- ⚠️ {$i18n.t('This permission is enabled for the default "user" role and will remain active.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if} @@ -323,225 +323,225 @@ {/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if} @@ -555,80 +555,80 @@
{$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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/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.')} +
+
+ {$i18n.t('This is a default user permission and will remain enabled.')}
{/if}