From 41edf99eb28220e05c917b13227e77017ec417f9 Mon Sep 17 00:00:00 2001 From: Muhsin Shah C P Date: Fri, 11 Apr 2025 13:28:22 +0530 Subject: [PATCH] fixed: builder and end-user were able to see the add workspace cta even if the flag is off (#12549) --- .../BaseWorkspaceActions.jsx | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/frontend/src/modules/common/components/BaseWorkspaceActions/BaseWorkspaceActions.jsx b/frontend/src/modules/common/components/BaseWorkspaceActions/BaseWorkspaceActions.jsx index 39492721ff..c9b67c05fe 100644 --- a/frontend/src/modules/common/components/BaseWorkspaceActions/BaseWorkspaceActions.jsx +++ b/frontend/src/modules/common/components/BaseWorkspaceActions/BaseWorkspaceActions.jsx @@ -11,6 +11,8 @@ const BaseWorkspaceActions = ({ }) => { //If License ToolTip component is not passed from version specific component--> We will show normal ToolTip component const isDefaultLicenseTooltip = LicenseTooltip === DefaultLicenseTooltip; + const isAllowPersonalWorkspace = window.public_config?.ALLOW_PERSONAL_WORKSPACE === 'true'; + return (
) : ( - -
= 100} - onClick={handleAddWorkspace} - style={{ marginLeft: super_admin ? '0px' : '10px' }} - > - -
-
+ (isAllowPersonalWorkspace || super_admin) && ( + +
= 100} + onClick={handleAddWorkspace} + style={{ marginLeft: super_admin ? '0px' : '10px' }} + > + +
+
+ ) )}
);