Skip to content

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

chore: move disallow ddl/dml to free (#14541)

ecmadaoab4cdfdacc9d
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.go
index 705553614c..98e95c8bc0 100644
--- a/backend/api/v1/org_policy_service.go
+++ b/backend/api/v1/org_policy_service.go
@@ -649,9 +649,6 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
}
return string(payloadBytes), nil
case v1pb.PolicyType_DATA_SOURCE_QUERY:
- if err := s.licenseService.IsFeatureEnabled(api.FeatureAccessControl); err != nil {
- return "", status.Error(codes.PermissionDenied, err.Error())
- }
payload, err := convertToDataSourceQueryPayload(policy.GetDataSourceQueryPolicy())
if err != nil {
return "", status.Error(codes.InvalidArgument, err.Error())
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
index 08c1259b87..56542282c2 100644
--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
@@ -82,36 +82,32 @@
<div>
<div class="w-full inline-flex items-center gap-x-2">
<Switch
- :value="
- hasAccessControlFeature ? !dataSourceQueryPolicy?.disallowDdl : true
- "
+ :value="dataSourceQueryPolicy?.disallowDdl ?? false"
:text="true"
- :disabled="!allowUpdatePolicy || !hasAccessControlFeature"
+ :disabled="!allowUpdatePolicy"
@update:value="
(on: boolean) => {
- updateAdminDataSourceQueryRestrctionPolicy({ disallowDdl: !on });
+ updateAdminDataSourceQueryRestrctionPolicy({ disallowDdl: on });
}
"
/>
<span class="textlabel">
- {{ $t("environment.statement-execution.allow-ddl") }}
+ {{ $t("environment.statement-execution.disallow-ddl") }}
</span>
</div>
<div class="w-full inline-flex items-center gap-x-2">
<Switch
- :value="
- hasAccessControlFeature ? !dataSourceQueryPolicy?.disallowDml : true
- "
+ :value="dataSourceQueryPolicy?.disallowDml ?? false"
:text="true"
- :disabled="!allowUpdatePolicy || !hasAccessControlFeature"
+ :disabled="!allowUpdatePolicy"
@update:value="
(on: boolean) => {
- updateAdminDataSourceQueryRestrctionPolicy({ disallowDml: !on });
+ updateAdminDataSourceQueryRestrctionPolicy({ disallowDml: on });
}
"
/>
<span class="textlabel">
- {{ $t("environment.statement-execution.allow-dml") }}
+ {{ $t("environment.statement-execution.disallow-dml") }}
</span>
</div>
</div>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index e658bce26c..554f864315 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1675,8 +1675,8 @@
},
"statement-execution": {
"title": "Statement execution",
- "allow-ddl": "Allow running DDL statements in the SQL editor",
- "allow-dml": "Allow running data-modifying DML statements in the SQL Editor"
+ "disallow-ddl": "Disallow running DDL statements in the SQL editor",
+ "disallow-dml": "Disallow running data-modifying DML statements in the SQL Editor"
}
},
"quick-start": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index f86cf02696..ac6cb97507 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1675,8 +1675,8 @@
},
"statement-execution": {
"title": "Ejecución de la declaración",
- "allow-ddl": "Permitir la ejecución de sentencias DDL en el editor SQL",
- "allow-dml": "Permitir ejecutar sentencias DML que modifiquen datos en el Editor SQL"
+ "disallow-ddl": "No permitir la ejecución de sentencias DDL en el editor SQL",
+ "disallow-dml": "No permitir la ejecución de instrucciones DML que modifiquen datos en el Editor SQL"
}
},
"quick-start": {
@@ -3881,4 +3881,4 @@
"last-visit": "Última visita",
"changelog-for-version": "Registro de cambios para {version}"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 863921ea57..71b9f17f68 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1675,8 +1675,8 @@
},
"statement-execution": {
"title": "ステートメントの実行",
- "allow-ddl": "SQLエディタでDDL文を実行できるようにする",
- "allow-dml": "SQL エディタでデータ変更 DML ステートメントを実行できるようにする"
+ "disallow-ddl": "SQL エディタで DDL ステートメントの実行を禁止する",
+ "disallow-dml": "SQL エディタでデータを変更する DML ステートメントの実行を禁止する"
}
},
"quick-start": {
@@ -3881,4 +3881,4 @@
"last-visit": "最終訪問",
"changelog-for-version": "{version} の変更履歴"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 01208c54eb..401c702c9f 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1675,8 +1675,8 @@
},
"statement-execution": {
"title": "语句执行",
- "allow-ddl": "允许在 SQL 编辑器中运行 DDL 语句",
- "allow-dml": "允许在 SQL 编辑器中运行修改数据的 DML 语句"
+ "disallow-ddl": "禁止在 SQL 编辑器中运行 DDL 语句",
+ "disallow-dml": "禁止在 SQL 编辑器中运行修改数据的 DML 语句"
}
},
"quick-start": {
@@ -3881,4 +3881,4 @@
"last-visit": "上次访问",
"changelog-for-version": "{version} 的更新日志"
}
-}
\ No newline at end of file
+}