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('Description')}
+
+
{$i18n.t('Description')}
-
diff --git a/src/lib/components/admin/Users/Groups/EditGroupModal.svelte b/src/lib/components/admin/Users/Groups/EditGroupModal.svelte
index c9b86d452..9deeed6e2 100644
--- a/src/lib/components/admin/Users/Groups/EditGroupModal.svelte
+++ b/src/lib/components/admin/Users/Groups/EditGroupModal.svelte
@@ -13,6 +13,7 @@
import Display from './Display.svelte';
import Permissions from './Permissions.svelte';
import Users from './Users.svelte';
+ import UsersSolid from '$lib/components/icons/UsersSolid.svelte';
export let onSubmit: Function = () => {};
export let onDelete: Function = () => {};
@@ -25,9 +26,9 @@
export let custom = true;
- export let tabs = ['display', 'permissions', 'users'];
+ export let tabs = ['general', 'permissions', 'users'];
- let selectedTab = 'display';
+ let selectedTab = 'general';
let name = '';
let description = '';
@@ -78,7 +79,7 @@
});
-
+
@@ -120,7 +121,102 @@
submitHandler();
}}
>
-
+
+ {#if tabs.includes('general')}
+
+ {/if}
+
+ {#if tabs.includes('permissions')}
+
+ {/if}
+
+ {#if tabs.includes('users')}
+
+ {/if}
+
+
+
+
+
+
{#if edit}
diff --git a/src/lib/components/admin/Users/Groups/GroupItem.svelte b/src/lib/components/admin/Users/Groups/GroupItem.svelte
index 6f8d462e9..6204fa691 100644
--- a/src/lib/components/admin/Users/Groups/GroupItem.svelte
+++ b/src/lib/components/admin/Users/Groups/GroupItem.svelte
@@ -39,7 +39,7 @@
showEdit = true;
}}
>
-
+
diff --git a/src/lib/components/admin/Users/Groups/Users.svelte b/src/lib/components/admin/Users/Groups/Users.svelte
index a44cf32cf..8f2a0d190 100644
--- a/src/lib/components/admin/Users/Groups/Users.svelte
+++ b/src/lib/components/admin/Users/Groups/Users.svelte
@@ -97,19 +97,21 @@
-
-
+
+
+
-
{user.name}
-
+ {user.name}
+
+
{#if userIds.includes(user.id)}