From 3af54bc685d98e3dec85d7afe18c361d47a82ed4 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 8 Jan 2026 16:12:35 +0800 Subject: [PATCH] fix: Regular users can create ds on chat --- frontend/src/views/chat/ChatCreator.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chat/ChatCreator.vue b/frontend/src/views/chat/ChatCreator.vue index 93c57f790..90d21ab6e 100644 --- a/frontend/src/views/chat/ChatCreator.vue +++ b/frontend/src/views/chat/ChatCreator.vue @@ -8,7 +8,11 @@ import { chatApi, ChatInfo } from '@/api/chat.ts' import { datasourceApi } from '@/api/datasource.ts' import Card from '@/views/ds/ChatCard.vue' import AddDrawer from '@/views/ds/AddDrawer.vue' +import { useUserStore } from '@/stores/user' +const userStore = useUserStore() + +const isWsAdmin = computed(() => userStore.isAdmin || userStore.isSpaceAdmin) const props = withDefaults( defineProps<{ hidden?: boolean @@ -187,7 +191,7 @@ defineExpose({ img-type="noneWhite" /> -
+