diff --git a/src/lib/components/admin/Users/Groups.svelte b/src/lib/components/admin/Users/Groups.svelte index 2f3c13aab..099517b50 100644 --- a/src/lib/components/admin/Users/Groups.svelte +++ b/src/lib/components/admin/Users/Groups.svelte @@ -7,7 +7,7 @@ import { onMount, getContext } from 'svelte'; import { goto } from '$app/navigation'; - import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores'; + import { WEBUI_NAME, config, user, showSidebar, knowledge } from '$lib/stores'; import { WEBUI_BASE_URL } from '$lib/constants'; import Tooltip from '$lib/components/common/Tooltip.svelte'; @@ -54,15 +54,51 @@ groups = [ { id: '1', - name: 'Admins', - description: 'Admins have full access to all features and settings.', - data: { - permissions: { - admin: true + name: 'Group A', + description: 'Group A description', + permissions: { + model: { + enable_filter: false, // boolean + ids: [], // array of strings + default_id: null // null or string + }, + workspace: { + models: false, // boolean + knowledge: false, // boolean + prompts: false // boolean + }, + chat: { + delete: true, // boolean + edit: true, // boolean + temporary: true // boolean } }, - user_ids: [1, 2, 3], - admin_ids: [1] + user_ids: ['1', '2', '3'], // array of strings + admin_ids: ['1'] // array of strings + }, + { + id: '2', + name: 'Moderators', + description: 'Moderators description', + permissions: { + model: { + enable_filter: false, // boolean + ids: [], // array of strings + default_id: null // null or string + }, + workspace: { + models: false, // boolean + knowledge: false, // boolean + prompts: false // boolean + }, + chat: { + delete: true, // boolean + edit: true, // boolean + temporary: true // boolean + } + }, + user_ids: ['1', '5', '6'], // array of strings + admin_ids: ['1'] // array of strings } ]; } @@ -153,15 +189,17 @@
-
+
{#each filteredGroups as group} - +
+ +
{/each} {/if} -
+
diff --git a/src/lib/components/admin/Users/Groups/AddGroupModal.svelte b/src/lib/components/admin/Users/Groups/AddGroupModal.svelte index 63b55f2fa..b2c202bf2 100644 --- a/src/lib/components/admin/Users/Groups/AddGroupModal.svelte +++ b/src/lib/components/admin/Users/Groups/AddGroupModal.svelte @@ -72,33 +72,35 @@ submitHandler(); }} > -
-
-
{$i18n.t('Name')}
+
+
+
+
{$i18n.t('Name')}
-
- +
+ +
-
-
-
{$i18n.t('Description')}
+
+
{$i18n.t('Description')}
-
-