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: custom approval is not a instance limit feature (#16174)
ecmadao3a6457ad7510
diff --git a/backend/base/plan.go b/backend/base/plan.goindex f6ff256fc8..ae7ca90dfb 100644--- a/backend/base/plan.go+++ b/backend/base/plan.go@@ -365,9 +365,8 @@ var InstanceLimitFeature = map[FeatureType]bool{FeatureSyncSchemaAllVersions: true,FeatureIndexAdvisor: true,// Policy Control- FeatureSensitiveData: true,- FeatureCustomApproval: true,- FeatureRolloutPolicy: true,+ FeatureSensitiveData: true,+ FeatureRolloutPolicy: true,}// Feature returns whether a particular feature is available in a particular plan.diff --git a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vueindex 436f2e9b56..35593cc7d2 100644--- a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue+++ b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue@@ -2,11 +2,7 @@<div ref="containerRef" class="h-full flex flex-col"><div class="border-b"><BannerSection v-if="!isCreating" />- <FeatureAttention- v-else-if="existedDeactivatedInstance"- type="warning"- feature="bb.feature.custom-approval"- />+ <FeatureAttention feature="bb.feature.custom-approval" /><HeaderSection /></div><div class="flex-1 flex flex-row">@@ -87,7 +83,6 @@ import {TaskRunSection,} from "./components";import { provideIssueSQLCheckContext } from "./components/SQLCheckSection/context";-import { provideIssueIntanceContext } from "./components/Sidebar/ReviewSection/utils";import type {IssueReviewAction,IssueStatusAction,@@ -137,6 +132,4 @@ const {desktopSidebarWidth,mobileSidebarOpen,} = provideSidebarContext(containerRef);--const { existedDeactivatedInstance } = provideIssueIntanceContext();</script>diff --git a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vueindex 62f490950c..500ee3ec7e 100644--- a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue+++ b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue@@ -2,11 +2,7 @@<div ref="containerRef" class="h-full flex flex-col"><div class="border-b"><BannerSection v-if="!isCreating" />- <FeatureAttention- v-else-if="existedDeactivatedInstance"- type="warning"- feature="bb.feature.custom-approval"- />+ <FeatureAttention feature="bb.feature.custom-approval" /><HeaderSection /></div>@@ -135,7 +131,6 @@ import {DatabaseResourceTable,Sidebar,} from "./components";-import { provideIssueIntanceContext } from "./components/Sidebar/ReviewSection/utils";import type { IssueReviewAction, IssueStatusAction } from "./logic";import { useIssueContext, usePollIssue } from "./logic";@@ -187,6 +182,4 @@ const {desktopSidebarWidth,mobileSidebarOpen,} = provideSidebarContext(containerRef);--const { existedDeactivatedInstance } = provideIssueIntanceContext();</script>diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vueindex 1076f62a99..a1d5282c83 100644--- a/frontend/src/components/IssueV1/IssueDetailPage.vue+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue@@ -2,11 +2,7 @@<div ref="containerRef" class="h-full flex flex-col"><div class="border-b"><BannerSection v-if="!isCreating" />- <FeatureAttention- v-else-if="existedDeactivatedInstance"- type="warning"- feature="bb.feature.custom-approval"- />+ <FeatureAttention feature="bb.feature.custom-approval" /><HeaderSection /></div>@@ -96,7 +92,6 @@ import {IssueCommentSection,} from "./components";import { provideIssueSQLCheckContext } from "./components/SQLCheckSection/context";-import { provideIssueIntanceContext } from "./components/Sidebar/ReviewSection/utils";import type {IssueReviewAction,IssueStatusAction,@@ -146,6 +141,4 @@ const {desktopSidebarWidth,mobileSidebarOpen,} = provideSidebarContext(containerRef);--const { existedDeactivatedInstance } = provideIssueIntanceContext();</script>diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vueindex 901824cf79..c434232349 100644--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/ReviewSection.vue@@ -6,10 +6,7 @@<div><div class="textlabel flex items-center gap-x-1">{{ $t("issue.approval-flow.self") }}- <FeatureBadge- feature="bb.feature.custom-approval"- :show-instance-missing-license="existedDeactivatedInstance"- />+ <FeatureBadge feature="bb.feature.custom-approval" /></div></div></template>@@ -65,10 +62,7 @@<div v-if="isCreating" class="flex flex-col gap-y-1"><div class="textlabel flex items-center gap-x-1">{{ $t("issue.approval-flow.self") }}- <FeatureBadge- feature="bb.feature.custom-approval"- :show-instance-missing-license="existedDeactivatedInstance"- />+ <FeatureBadge feature="bb.feature.custom-approval" /></div><div class="text-control-placeholder text-xs">{{ $t("issue.approval-flow.pre-issue-created-tips") }}@@ -85,11 +79,9 @@ import { useIssueContext, useWrappedReviewStepsV1 } from "@/components/IssueV1";import { useIssueV1Store } from "@/store";import RiskLevelTag from "./RiskLevelTag.vue";import Timeline from "./Timeline.vue";-import { useIssueIntanceContext } from "./utils";const { issue, events, isCreating, reviewContext } = useIssueContext();const { ready, error } = reviewContext;-const { existedDeactivatedInstance } = useIssueIntanceContext();const wrappedSteps = useWrappedReviewStepsV1(issue, reviewContext);diff --git a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/utils.ts b/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/utils.tsdeleted file mode 100644index 63f8b6a154..0000000000--- a/frontend/src/components/IssueV1/components/Sidebar/ReviewSection/utils.ts+++ /dev/null@@ -1,55 +0,0 @@-import { uniq } from "lodash-es";-import { computed, inject, provide } from "vue";-import type { InjectionKey, Ref } from "vue";-import { useIssueContext } from "@/components/IssueV1/logic";-import { databaseForTask } from "@/components/Rollout/RolloutDetail";-import { useSubscriptionV1Store, useInstanceResourceByName } from "@/store";-import { isValidDatabaseName } from "@/types";--export type IssueIntanceContext = {- existedDeactivatedInstance: Ref<boolean>;-};--const KEY = Symbol("bb.issue.instances") as InjectionKey<IssueIntanceContext>;--export const useIssueIntanceContext = () => {- return inject(KEY)!;-};--export const provideIssueIntanceContext = () => {- const { issue } = useIssueContext();- const subscriptionStore = useSubscriptionV1Store();-- const distinctInstanceList = computed(() => {- const instances =- issue.value.rolloutEntity?.stages.flatMap((stage) => {- return stage.tasks- .map((task) => databaseForTask(issue.value.projectEntity, task))- .filter((db) => isValidDatabaseName(db.name))- .map((db) => db.instance);- }) ?? [];-- const resp = [];- for (const instanceName of uniq(instances)) {- const { instance } = useInstanceResourceByName(instanceName);- resp.push(instance);- }- return resp;- });-- const existedDeactivatedInstance = computed(() => {- return distinctInstanceList.value.some((ins) =>- subscriptionStore.instanceMissingLicense(- "bb.feature.custom-approval",- ins.value- )- );- });-- const context: IssueIntanceContext = {- existedDeactivatedInstance,- };-- provide(KEY, context);- return context;-};diff --git a/frontend/src/components/v2/Select/RoleSelect.vue b/frontend/src/components/v2/Select/RoleSelect.vueindex 1eb41759d9..5ff6f12c98 100644--- a/frontend/src/components/v2/Select/RoleSelect.vue+++ b/frontend/src/components/v2/Select/RoleSelect.vue@@ -132,7 +132,7 @@ const renderLabel = (option: SelectOption) => {}const icon = h(FeatureBadge, {- feature: "bb.feature.custom-approval",+ feature: "bb.feature.custom-role",clickable: false,});return h(diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.tsindex 094302b093..687541b9b2 100644--- a/frontend/src/types/plan.ts+++ b/frontend/src/types/plan.ts@@ -74,7 +74,6 @@ export const instanceLimitFeature = new Set<FeatureType>(["bb.feature.database-grouping",// Policy Control"bb.feature.sensitive-data",- "bb.feature.custom-approval","bb.feature.rollout-policy",]);