From 4e188275125ea6f67d959381302eda6283da374e Mon Sep 17 00:00:00 2001 From: Trisha Anand Date: Tue, 5 Nov 2024 19:19:26 +0530 Subject: [PATCH] fix: Only trigger restart if current user is an instance admin. (#37227) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 4fa5ebcd78bc8206f9ce3ac5641d9e0605df25f0 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Tue, 05 Nov 2024 10:24:09 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Enhanced user context processing during the restart operation. - Improved error handling and configuration for sending test emails. - **Bug Fixes** - Addressed issues related to connection testing and email sending with detailed error messages. --- .../java/com/appsmith/server/solutions/ce/EnvManagerCEImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/EnvManagerCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/EnvManagerCEImpl.java index e21a319193..af74b26950 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/EnvManagerCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/EnvManagerCEImpl.java @@ -725,7 +725,7 @@ public class EnvManagerCEImpl implements EnvManagerCE { @Override public Mono restart() { - return verifyCurrentUserIsSuper().then(restartWithoutAclCheck()); + return verifyCurrentUserIsSuper().flatMap(user -> restartWithoutAclCheck()); } /**