mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fixed: builder and end-user were able to see the add workspace cta even if the flag is off (#12549)
This commit is contained in:
parent
c9493259ba
commit
41edf99eb2
1 changed files with 19 additions and 15 deletions
|
|
@ -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 (
|
||||
<div
|
||||
className="d-flex"
|
||||
|
|
@ -24,21 +26,23 @@ const BaseWorkspaceActions = ({
|
|||
</div>
|
||||
</ToolTip>
|
||||
) : (
|
||||
<LicenseTooltip
|
||||
limits={workspacesLimit}
|
||||
feature={'workspaces'}
|
||||
placement="top"
|
||||
customTitle="Add new workspace"
|
||||
isAvailable={true}
|
||||
>
|
||||
<div
|
||||
disabled={!workspacesLimit.canAddUnlimited && workspacesLimit?.percentage >= 100}
|
||||
onClick={handleAddWorkspace}
|
||||
style={{ marginLeft: super_admin ? '0px' : '10px' }}
|
||||
>
|
||||
<SolidIcon name="plus" fill="var(--icon-strong)" dataCy="add-new-workspace-link" width="17" />
|
||||
</div>
|
||||
</LicenseTooltip>
|
||||
(isAllowPersonalWorkspace || super_admin) && (
|
||||
<LicenseTooltip
|
||||
limits={workspacesLimit}
|
||||
feature={'workspaces'}
|
||||
placement="top"
|
||||
customTitle="Add new workspace"
|
||||
isAvailable={true}
|
||||
>
|
||||
<div
|
||||
disabled={!workspacesLimit.canAddUnlimited && workspacesLimit?.percentage >= 100}
|
||||
onClick={handleAddWorkspace}
|
||||
style={{ marginLeft: super_admin ? '0px' : '10px' }}
|
||||
>
|
||||
<SolidIcon name="plus" fill="var(--icon-strong)" dataCy="add-new-workspace-link" width="17" />
|
||||
</div>
|
||||
</LicenseTooltip>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue