Skip to content

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

chore: add missing semantic types sidebar in the sql editor (#15061)

ecmadaof12b0d9ee86a
diff --git a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
index f293882916..0fbc3e2898 100644
--- a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
+++ b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue
@@ -175,7 +175,7 @@ const columnList = computed(() => {
<h3>
{getMaskingType(item.item.algorithm)
? t(
- `dynamic.settings.sensitive-data.algorithms.${getMaskingType(item.item.algorithm)?.toLowerCase()}.self`
+ `settings.sensitive-data.algorithms.${getMaskingType(item.item.algorithm)?.toLowerCase()}.self`
)
: t("settings.sensitive-data.algorithms.default")}
</h3>
diff --git a/frontend/src/router/dashboard/workspace.ts b/frontend/src/router/dashboard/workspace.ts
index ec82fb37c6..b6e96cf198 100644
--- a/frontend/src/router/dashboard/workspace.ts
+++ b/frontend/src/router/dashboard/workspace.ts
@@ -325,7 +325,7 @@ const workspaceRoutes: RouteRecordRaw[] = [
name: WORKSPACE_ROUTE_SEMANTIC_TYPES,
meta: {
title: () => t("settings.sensitive-data.semantic-types.self"),
- requiredWorkspacePermissionList: () => ["bb.policies.get"],
+ requiredWorkspacePermissionList: () => ["bb.settings.get"],
},
component: () => import("@/views/SettingWorkspaceSemanticTypes.vue"),
props: true,
@@ -335,7 +335,7 @@ const workspaceRoutes: RouteRecordRaw[] = [
name: WORKSPACE_ROUTE_DATA_CLASSIFICATION,
meta: {
title: () => t("settings.sidebar.data-classification"),
- requiredWorkspacePermissionList: () => ["bb.policies.get"],
+ requiredWorkspacePermissionList: () => ["bb.settings.get"],
},
component: () =>
import("@/views/SettingWorkspaceDataClassification.vue"),
diff --git a/frontend/src/router/sqlEditor.ts b/frontend/src/router/sqlEditor.ts
index 1f476ab105..a753650ad8 100644
--- a/frontend/src/router/sqlEditor.ts
+++ b/frontend/src/router/sqlEditor.ts
@@ -28,6 +28,8 @@ export const SQL_EDITOR_SETTING_AUDIT_LOG_MODULE =
"sql-editor.setting.audit-log";
export const SQL_EDITOR_SETTING_DATA_CLASSIFICATION_MODULE =
"sql-editor.setting.data-classification";
+export const SQL_EDITOR_SETTING_DATA_SEMANTIC_TYPES =
+ "sql-editor.setting.semantic-types";
export const SQL_EDITOR_SETTING_GLOBAL_MASKING_MODULE =
"sql-editor.setting.global-masking";
export const SQL_EDITOR_SETTING_PROFILE_MODULE = "sql-editor.setting.profile";
@@ -189,11 +191,20 @@ const sqlEditorRoutes: RouteRecordRaw[] = [
path: "data-classification",
name: SQL_EDITOR_SETTING_DATA_CLASSIFICATION_MODULE,
meta: {
- requiredWorkspacePermissionList: () => ["bb.policies.get"],
+ requiredWorkspacePermissionList: () => ["bb.settings.get"],
},
component: () =>
import("../views/sql-editor/Setting/DataClassification"),
},
+ {
+ path: "semantic-types",
+ name: SQL_EDITOR_SETTING_DATA_SEMANTIC_TYPES,
+ meta: {
+ requiredWorkspacePermissionList: () => ["bb.settings.get"],
+ },
+ component: () =>
+ import("../views/sql-editor/Setting/SemanticTypes"),
+ },
{
path: "global-masking",
name: SQL_EDITOR_SETTING_GLOBAL_MASKING_MODULE,
diff --git a/frontend/src/views/sql-editor/Setting/SemanticTypes/SemanticTypes.vue b/frontend/src/views/sql-editor/Setting/SemanticTypes/SemanticTypes.vue
new file mode 100644
index 0000000000..600d7fe2fd
--- /dev/null
+++ b/frontend/src/views/sql-editor/Setting/SemanticTypes/SemanticTypes.vue
@@ -0,0 +1,9 @@
+<template>
+ <div class="flex flex-col gap-4 py-4 px-4">
+ <SettingWorkspaceSemanticTypes />
+ </div>
+</template>
+
+<script setup lang="ts">
+import SettingWorkspaceSemanticTypes from "@/views/SettingWorkspaceSemanticTypes.vue";
+</script>
diff --git a/frontend/src/views/sql-editor/Setting/SemanticTypes/index.ts b/frontend/src/views/sql-editor/Setting/SemanticTypes/index.ts
new file mode 100644
index 0000000000..a82affa85b
--- /dev/null
+++ b/frontend/src/views/sql-editor/Setting/SemanticTypes/index.ts
@@ -0,0 +1,3 @@
+import SQLEditorSettingSemanticTypes from "./SemanticTypes.vue";
+
+export default SQLEditorSettingSemanticTypes;
diff --git a/frontend/src/views/sql-editor/Setting/Sidebar/common.ts b/frontend/src/views/sql-editor/Setting/Sidebar/common.ts
index f2bea44e84..796409be83 100644
--- a/frontend/src/views/sql-editor/Setting/Sidebar/common.ts
+++ b/frontend/src/views/sql-editor/Setting/Sidebar/common.ts
@@ -16,6 +16,7 @@ import sqlEditorRoutes, {
SQL_EDITOR_SETTING_AUDIT_LOG_MODULE,
SQL_EDITOR_SETTING_DATA_CLASSIFICATION_MODULE,
SQL_EDITOR_SETTING_GLOBAL_MASKING_MODULE,
+ SQL_EDITOR_SETTING_DATA_SEMANTIC_TYPES,
SQL_EDITOR_SETTING_DATABASES_MODULE,
SQL_EDITOR_SETTING_ENVIRONMENT_MODULE,
SQL_EDITOR_SETTING_GENERAL_MODULE,
@@ -218,6 +219,11 @@ export const useSidebarItems = (ignoreModeCheck?: MaybeRef<boolean>) => {
type: "div",
expand: true,
children: [
+ {
+ title: t("settings.sensitive-data.semantic-types.self"),
+ name: SQL_EDITOR_SETTING_DATA_SEMANTIC_TYPES,
+ type: "route",
+ },
{
title: t("settings.sidebar.data-classification"),
name: SQL_EDITOR_SETTING_DATA_CLASSIFICATION_MODULE,