Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: disable copy data check for database's effective env (#16262)
boojack2d4c963006ce
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vueindex e90d1323d0..e18e324b33 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue@@ -260,6 +260,7 @@ const disallowCopyingData = computed(() => {return false;}+ let environment = instance.value.environment;if (props.database) {const projectLevelPolicy = policyStore.getPolicyByParentAndType({parentPath: props.database?.project,@@ -268,10 +269,13 @@ const disallowCopyingData = computed(() => {if (projectLevelPolicy?.disableCopyDataPolicy?.active) {return true;}+ // If the database is provided, use its effective environment.+ environment = props.database.effectiveEnvironment;}+ // Check if the environment has a policy that disables copying data.const policy = policyStore.getPolicyByParentAndType({- parentPath: instance.value.environment,+ parentPath: environment,policyType: PolicyType.DISABLE_COPY_DATA,});if (policy?.disableCopyDataPolicy?.active) {