Skip to content

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

chore: use bb.feature.dba-workflow for export/query control (#6730)

Tianzhou (天舟)7d9bd617d377
diff --git a/backend/legacyapi/plan.go b/backend/legacyapi/plan.go
index 12680dc2c1..acb5c9cd64 100644
--- a/backend/legacyapi/plan.go
+++ b/backend/legacyapi/plan.go
@@ -84,7 +84,8 @@ const (
//
// - Developers can't create and view instances since they are exclusively by DBA, they can
// only access database.
- // - Developers can submit troubleshooting issue.
+ // - Developers can't create database.
+ // - Developers can't query and export data directly. They must request corresponding permissions first.
FeatureDBAWorkflow FeatureType = "bb.feature.dba-workflow"
// FeatureIMApproval integrates IM approval into Bytebase, allowing users approve Bytebase issues on the IM.
FeatureIMApproval FeatureType = "bb.feature.im.approval"
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vue
index d4ef0489b2..eb1159c9fb 100644
--- a/frontend/src/components/QuickActionPanel.vue
+++ b/frontend/src/components/QuickActionPanel.vue
@@ -172,7 +172,7 @@
</h3>
</div>
- <template v-if="hasCustomRoleFeature">
+ <template v-if="hasDBAWorkflowFeature">
<div
v-if="quickAction === 'quickaction.bb.issue.grant.request.querier'"
class="flex flex-col items-center w-24"
@@ -321,8 +321,8 @@ const route = useRoute();
const commandStore = useCommandStore();
const subscriptionStore = useSubscriptionV1Store();
-const hasCustomRoleFeature = computed(() => {
- return subscriptionStore.hasFeature("bb.feature.custom-role");
+const hasDBAWorkflowFeature = computed(() => {
+ return subscriptionStore.hasFeature("bb.feature.dba-workflow");
});
const state = reactive<LocalState>({
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultView.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultView.vue
index 262f8d9f72..63e2f10cbc 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultView.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultView.vue
@@ -276,7 +276,7 @@ const exportDropdownOptions = computed(() => [
]);
const showExportButton = computed(() => {
- if (!featureToRef("bb.feature.custom-role").value) {
+ if (!featureToRef("bb.feature.dba-workflow").value) {
return true;
}
return hasWorkspacePermissionV1(
@@ -287,7 +287,7 @@ const showExportButton = computed(() => {
const showRequestExportButton = computed(() => {
return (
- featureToRef("bb.feature.custom-role").value && !showExportButton.value
+ featureToRef("bb.feature.dba-workflow").value && !showExportButton.value
);
});
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
index 06cf60a8e3..ec8c99d349 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
@@ -204,7 +204,7 @@ const showSearchFeature = computed(() => {
});
const showExportButton = computed(() => {
- if (!featureToRef("bb.feature.custom-role").value) {
+ if (!featureToRef("bb.feature.dba-workflow").value) {
return true;
}
return hasWorkspacePermissionV1(
@@ -215,7 +215,7 @@ const showExportButton = computed(() => {
const showRequestExportButton = computed(() => {
return (
- featureToRef("bb.feature.custom-role").value && !showExportButton.value
+ featureToRef("bb.feature.dba-workflow").value && !showExportButton.value
);
});