From 277a3a0f454a779219e394cf533c9d87041d75aa Mon Sep 17 00:00:00 2001 From: Nirmal Sarswat <25587962+vivonk@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:36:30 +0530 Subject: [PATCH] chore: Using retrieve by id for fetching super admin permission group (#27898) ## Description Fetching super admin permission group without user context check using retrieveById. #### Type of change - Chore (housekeeping or task changes that don't impact user perception) #### How Has This Been Tested? - [x] Manual - [x] JUnit ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [x] Added `Test Plan Approved` label after Cypress tests were reviewed - [x] Added `Test Plan Approved` label after JUnit tests were reviewed --- .../main/java/com/appsmith/server/helpers/ce/UserUtilsCE.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/UserUtilsCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/UserUtilsCE.java index b080c7784c..c2d19bccd7 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/UserUtilsCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/UserUtilsCE.java @@ -204,7 +204,7 @@ public class UserUtilsCE { .flatMap(instanceConfig -> { JSONObject config = instanceConfig.getConfig(); String defaultPermissionGroup = (String) config.getOrDefault(DEFAULT_PERMISSION_GROUP, ""); - return permissionGroupRepository.findById(defaultPermissionGroup); + return permissionGroupRepository.retrieveById(defaultPermissionGroup); }); } }