Skip to content

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

fix: only show statement exec policy for environment resource (#14149)

ecmadao8d17e6b2c3fc
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
index 1f50979fc5..bb9529e2f6 100644
--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
@@ -61,7 +61,13 @@
</div>
</div>
</div>
- <div v-if="databaseChangeMode === 'PIPELINE'" class="flex flex-col gap-y-2">
+ <div
+ v-if="
+ databaseChangeMode === 'PIPELINE' &&
+ resource.startsWith(environmentNamePrefix)
+ "
+ class="flex flex-col gap-y-2"
+ >
<div class="textlabel flex items-center space-x-2">
<label>
{{ $t("environment.statement-execution.title") }}
@@ -112,6 +118,7 @@ import {
usePolicyV1Store,
useAppFeature,
} from "@/store";
+import { environmentNamePrefix } from "@/store/modules/v1/common";
import {
DataSourceQueryPolicy,
DataSourceQueryPolicy_Restriction,