From 467a1f65eb060c7dc4bc5e8d30ff3df15f724a3e Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Mon, 19 Dec 2022 15:29:58 +0530 Subject: [PATCH] chore: Fix inconsistency in behaviour when re-marking public (#19031) Signed-off-by: Shrikant Sharat Kandula --- .../services/ce/ApplicationServiceCEImpl.java | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationServiceCEImpl.java index 33ca6ec5f5..9fb136f7e2 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationServiceCEImpl.java @@ -1,6 +1,7 @@ package com.appsmith.server.services.ce; import com.appsmith.external.constants.AnalyticsEvents; +import com.appsmith.external.models.ActionDTO; import com.appsmith.external.models.Datasource; import com.appsmith.external.models.Policy; import com.appsmith.server.acl.AclPermission; @@ -19,7 +20,6 @@ import com.appsmith.server.domains.Page; import com.appsmith.server.domains.QApplication; import com.appsmith.server.domains.Theme; import com.appsmith.server.domains.User; -import com.appsmith.external.models.ActionDTO; import com.appsmith.server.dtos.ApplicationAccessDTO; import com.appsmith.server.dtos.GitAuthDTO; import com.appsmith.server.dtos.GitDeployKeyDTO; @@ -39,7 +39,6 @@ import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.PermissionGroupService; import com.appsmith.server.services.SessionUserService; import com.appsmith.server.services.TenantService; -import com.mongodb.DBObject; import com.appsmith.server.solutions.ApplicationPermission; import com.appsmith.server.solutions.DatasourcePermission; import com.mongodb.client.result.UpdateResult; @@ -48,10 +47,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DuplicateKeyException; import org.springframework.data.mongodb.core.ReactiveMongoTemplate; import org.springframework.data.mongodb.core.convert.MongoConverter; -import org.springframework.data.mongodb.core.query.Criteria; -import org.springframework.data.mongodb.core.query.Query; -import org.springframework.data.mongodb.core.query.Update; -import org.springframework.security.core.context.ReactiveSecurityContextHolder; import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; import reactor.core.publisher.Flux; @@ -67,7 +62,6 @@ import java.util.Set; import static com.appsmith.server.acl.AclPermission.MANAGE_APPLICATIONS; import static com.appsmith.server.acl.AclPermission.READ_APPLICATIONS; - import static org.apache.commons.lang3.StringUtils.isBlank; @Slf4j @@ -329,19 +323,17 @@ public class ApplicationServiceCEImpl extends BaseService