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.
This commit is contained in:
Sangeeth Sivan 2022-12-14 23:38:58 +05:30 committed by GitHub
parent 91f81484b4
commit c8d396fa32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -705,7 +705,7 @@ function ApplicationsSection(props: any) {
canInviteToWorkspace ||
hasManageWorkspacePermissions ||
hasCreateNewApplicationPermission ||
canDeleteWorkspace;
(canDeleteWorkspace && applications.length === 0);
return (
<WorkspaceSection