From 8946b48ca8cf2ffbb1ce2350c8ecc3fc19fff739 Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Tue, 5 Nov 2024 17:58:45 +0530 Subject: [PATCH] fix: Using create action permission for schema generation to ensure this is only used by developers with appropriate permissions on the datasource --- .../server/solutions/ce/DatasourceStructureSolutionCEImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceStructureSolutionCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceStructureSolutionCEImpl.java index e93c4c13149..19fec9feea6 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceStructureSolutionCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceStructureSolutionCEImpl.java @@ -183,7 +183,7 @@ public Mono getStructure(DatasourceStorage datasourceStorag public Mono getSchemaPreviewData( String datasourceId, String environmentId, Template queryTemplate) { return datasourceService - .findById(datasourceId, datasourcePermission.getExecutePermission()) + .findById(datasourceId, datasourcePermission.getActionCreatePermission()) .zipWhen(datasource -> datasourceService.getTrueEnvironmentId( datasource.getWorkspaceId(), environmentId,