Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: remove Admin/DBA exception for data copying in SQL Editor (#18360)

Danny Xu48e8ddb29641
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 1701873883..a2fe93dc76 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1504,7 +1504,7 @@
"production-environment": "Production environment",
"access-control": {
"title": "Access Control",
- "disable-copy-data-from-sql-editor": "Restrict data copying in SQL Editor (Admins/DBAs allowed)",
+ "disable-copy-data-from-sql-editor": "Restrict data copying in SQL Editor",
"restrict-admin-connection": {
"self": "Restrict querying admin data sources",
"disallow": "Disallow querying data from the admin data source",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 0643a2e742..fbcca64bd7 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1504,7 +1504,7 @@
"production-environment": "Entorno de producción",
"access-control": {
"title": "Control de Acceso",
- "disable-copy-data-from-sql-editor": "Restringir la copia de datos en el editor SQL (permitido para administradores/DBA)",
+ "disable-copy-data-from-sql-editor": "Restringir la copia de datos en el editor SQL",
"restrict-admin-connection": {
"self": "Restringir la consulta de la fuente de datos de administración",
"disallow": "No permitir la consulta de datos desde la fuente de datos de administración",
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 6e5335d62f..76347d95da 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1504,7 +1504,7 @@
"production-environment": "本番環境",
"access-control": {
"title": "アクセス制御",
- "disable-copy-data-from-sql-editor": "SQL エディタにおけるデータコピーの制限 (管理者/DBA はコピー可能)",
+ "disable-copy-data-from-sql-editor": "SQL エディタにおけるデータコピーの制限",
"restrict-admin-connection": {
"self": "管理データソースのクエリを制限する",
"disallow": "管理データソースからのデータのクエリを禁止する",
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 30ff7d5b61..d7ab34c97e 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1504,7 +1504,7 @@
"production-environment": "Môi trường sản xuất",
"access-control": {
"title": "Kiểm soát truy cập",
- "disable-copy-data-from-sql-editor": "Hạn chế sao chép dữ liệu trong Trình soạn thảo SQL (Quản trị viên/DBA được phép)",
+ "disable-copy-data-from-sql-editor": "Hạn chế sao chép dữ liệu trong Trình soạn thảo SQL",
"restrict-admin-connection": {
"self": "Hạn chế truy vấn nguồn dữ liệu quản trị",
"disallow": "Không cho phép truy vấn dữ liệu từ nguồn dữ liệu quản trị",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 2b42925b86..e77752286e 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1504,7 +1504,7 @@
"production-environment": "生产环境",
"access-control": {
"title": "访问控制",
- "disable-copy-data-from-sql-editor": "限制 SQL 编辑器中的数据复制 (管理员/DBA 可以复制)",
+ "disable-copy-data-from-sql-editor": "限制 SQL 编辑器中的数据复制",
"restrict-admin-connection": {
"self": "限制查询主数据源",
"disallow": "不允许从主数据源查询数据",
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
index 6382921b50..5e10b9e2e5 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
@@ -201,7 +201,7 @@ import type {
} from "@/types";
import { ExportFormat } from "@/types/proto-es/v1/common_pb";
import { ExportRequestSchema } from "@/types/proto-es/v1/sql_service_pb";
-import { hasWorkspacePermissionV2 } from "@/utils";
+
import type { SQLResultViewContext } from "./context";
import { provideSQLResultViewContext } from "./context";
import { provideBinaryFormatContext } from "./DataTable/binary-format-store";
@@ -307,11 +307,6 @@ const tabName = (index: number) => {
};
const disallowCopyingData = computed(() => {
- if (hasWorkspacePermissionV2("bb.sql.admin")) {
- // `disableCopyDataPolicy` is only applicable to workspace developers.
- return false;
- }
-
if (
policyStore.getQueryDataPolicyByParent(props.database.project)
.disableCopyData