mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: Regular users can create ds on chat
This commit is contained in:
committed by
fit2cloud-chenyw
parent
bc19f0ab76
commit
a0544fae83
@@ -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"
|
||||
/>
|
||||
|
||||
<div style="text-align: center; margin-top: -10px">
|
||||
<div v-if="isWsAdmin" style="text-align: center; margin-top: -10px">
|
||||
<el-button type="primary" @click="handleAddDatasource">
|
||||
<template #icon>
|
||||
<icon_add_outlined></icon_add_outlined>
|
||||
|
||||
Reference in New Issue
Block a user