From c8d396fa329e0975f44508f56352fbefcec03117 Mon Sep 17 00:00:00 2001 From: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com> Date: Wed, 14 Dec 2022 23:38:58 +0530 Subject: [PATCH] fix: update delete workspace permission and condition case (#18930) handles delete option edgecase: when user has the delete permission but workspace has applications, user should not be able to delete the workspace. This commit hides the option. --- app/client/src/pages/Applications/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/src/pages/Applications/index.tsx b/app/client/src/pages/Applications/index.tsx index dc208ce546..653ebbad3d 100644 --- a/app/client/src/pages/Applications/index.tsx +++ b/app/client/src/pages/Applications/index.tsx @@ -705,7 +705,7 @@ function ApplicationsSection(props: any) { canInviteToWorkspace || hasManageWorkspacePermissions || hasCreateNewApplicationPermission || - canDeleteWorkspace; + (canDeleteWorkspace && applications.length === 0); return (