Skip to content

Commit

Permalink
fix: Using create action permission for schema generation to ensure t…
Browse files Browse the repository at this point in the history
…his is only used by developers with appropriate permissions on the datasource
  • Loading branch information
trishaanand committed Nov 5, 2024
1 parent 6660bd9 commit 8946b48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public Mono<DatasourceStructure> getStructure(DatasourceStorage datasourceStorag
public Mono<ActionExecutionResult> getSchemaPreviewData(
String datasourceId, String environmentId, Template queryTemplate) {
return datasourceService
.findById(datasourceId, datasourcePermission.getExecutePermission())
.findById(datasourceId, datasourcePermission.getActionCreatePermission())
.zipWhen(datasource -> datasourceService.getTrueEnvironmentId(
datasource.getWorkspaceId(),
environmentId,
Expand Down

0 comments on commit 8946b48

Please sign in to comment.