From 79164fde447ba2f10ebf60d31a4c6113c27b170c Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Mon, 8 Mar 2021 16:04:17 +0530 Subject: [PATCH] Only return request object in action execute if the action was executed in EDIT mode. (#3426) --- .../appsmith/server/services/NewActionServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java index 1b9865fe63..155371b4b3 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/NewActionServiceImpl.java @@ -14,7 +14,6 @@ import com.appsmith.external.models.DatasourceConfiguration; import com.appsmith.external.models.Param; import com.appsmith.external.models.Policy; import com.appsmith.external.models.Provider; -import com.appsmith.external.models.QActionConfiguration; import com.appsmith.external.plugins.PluginExecutor; import com.appsmith.server.acl.AclPermission; import com.appsmith.server.acl.PolicyGenerator; @@ -668,6 +667,13 @@ public class NewActionServiceImpl extends BaseService { + // In case the action was executed in view mode, do not return the request object + if (TRUE.equals(executeActionDTO.getViewMode())) { + result.setRequest(null); + } + return result; + }) .elapsed() .map(tuple -> { log.debug("{}: Action {} with id {} execution time : {} ms",