Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add specific error message for data export creator restriction (#17854)
boojackdb3256d8d45a
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue b/frontend/src/components/Plan/components/RolloutView/TaskOperations.vueindex f71c4f7c93..00bae89da6 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue@@ -55,6 +55,9 @@ import { NButton, NScrollbar, NTooltip } from "naive-ui";import type { VNode } from "vue";import { computed, h, reactive } from "vue";import { useI18n } from "vue-i18n";+import { useCurrentUserV1 } from "@/store";+import { userNamePrefix } from "@/store/modules/v1/common";+import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import type {Task,@@ -96,6 +99,7 @@ const state = reactive<LocalState>({const { t } = useI18n();const { readonly, issue } = usePlanContextWithRollout();+const currentUser = useCurrentUserV1();// Action target for the panelconst actionTarget = computed(() => {@@ -159,6 +163,14 @@ const getDisabledTooltip = (_action: string) => {return t("task.no-tasks-selected");}if (!canPerformTaskActions.value) {+ // Special message for data export issues when user is not the creator+ if (+ issue.value &&+ issue.value.type === Issue_Type.DATABASE_EXPORT &&+ issue.value.creator !== `${userNamePrefix}${currentUser.value.email}`+ ) {+ return t("task.data-export-creator-only");+ }return t("task.no-permission");}return "";diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vueindex 83a807e1e6..63b18dc79c 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue@@ -313,10 +313,13 @@ import {pushNotification,useEnvironmentV1Store,usePolicyByParentAndType,+ useCurrentUserV1,} from "@/store";+import { userNamePrefix } from "@/store/modules/v1/common";import {Issue_Approver_Status,Issue_ApprovalStatus,+ Issue_Type,} from "@/types/proto-es/v1/issue_service_pb";import {PolicyType,@@ -360,6 +363,7 @@ const emit = defineEmits<{const { t } = useI18n();const { issue, rollout, plan, taskRuns } = usePlanContextWithRollout();+const currentUser = useCurrentUserV1();const loading = ref(false);const environmentStore = useEnvironmentV1Store();@@ -502,7 +506,16 @@ const validationErrors = computed(() => {// Permission errors - always block rolloutif (!canRolloutTasks(eligibleTasks.value, issue.value)) {- errors.push(t("task.no-permission"));+ // Special message for data export issues when user is not the creator+ if (+ issue.value &&+ issue.value.type === Issue_Type.DATABASE_EXPORT &&+ issue.value.creator !== `${userNamePrefix}${currentUser.value.email}`+ ) {+ errors.push(t("task.data-export-creator-only"));+ } else {+ errors.push(t("task.no-permission"));+ }}// No active tasks to cancel - blocking errordiff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 6d608e4034..aea4d3e8bc 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -313,6 +313,7 @@"no-skippable-tasks": "No skippable tasks","no-cancellable-tasks": "No cancellable tasks","no-permission": "No permission to perform this action",+ "data-export-creator-only": "Only the issue creator can execute data export tasks","scheduled-time": "Scheduled time","select-scheduled-time": "Select scheduled time","error": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 5949155a2f..fd2af8601b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -313,6 +313,7 @@"no-skippable-tasks": "No hay tareas que se puedan omitir","no-cancellable-tasks": "No hay tareas cancelables","no-permission": "No hay permiso para realizar esta acción",+ "data-export-creator-only": "Sólo el creador del problema puede ejecutar tareas de exportación de datos","scheduled-time": "Hora programada","select-scheduled-time": "Seleccionar hora programada","error": {diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 33def78570..3eb53fd274 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -313,6 +313,7 @@"no-skippable-tasks": "スキップ可能なタスクはありません","no-cancellable-tasks": "キャンセル可能なタスクはありません","no-permission": "この操作を実行する権限がありません",+ "data-export-creator-only": "問題作成者のみがデータエクスポートタスクを実行できます","scheduled-time": "予定時刻","select-scheduled-time": "予定時刻を選択してください","error": {diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex ab6648a9ff..33466e7bce 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -313,6 +313,7 @@"no-skippable-tasks": "Không có nhiệm vụ nào có thể bỏ qua","no-cancellable-tasks": "Không có nhiệm vụ nào có thể hủy bỏ","no-permission": "Không có quyền thực hiện hành động này",+ "data-export-creator-only": "Chỉ người tạo sự cố mới có thể thực hiện tác vụ xuất dữ liệu","scheduled-time": "Thời gian đã lên lịch","select-scheduled-time": "Chọn thời gian đã lên lịch","error": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex ea56c39ed1..19bef59ed4 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -313,6 +313,7 @@"no-skippable-tasks": "没有可跳过的任务","no-cancellable-tasks": "没有可取消的任务","no-permission": "无权限执行该操作",+ "data-export-creator-only": "只有工单创建者可以执行数据导出任务","scheduled-time": "计划时间","select-scheduled-time": "选择计划时间","error": {