Fix Bug 67577

The DocSpace deletion section is displayed without Spaces
This commit is contained in:
Viktor Fomin 2024-07-04 12:22:04 +03:00
parent 037b868564
commit 94235ee052
4 changed files with 12 additions and 2 deletions

View File

@ -46,6 +46,7 @@ const PrivateRouteWrapper = ({
restricted,
withCollaborator,
withManager,
baseDomain,
}: Partial<PrivateRouteProps>) => {
return (
<PrivateRoute
@ -64,6 +65,7 @@ const PrivateRouteWrapper = ({
withCollaborator={withCollaborator}
isPortalDeactivate={isPortalDeactivate!}
enablePortalRename={enablePortalRename!}
baseDomain={baseDomain}
>
{children}
</PrivateRoute>
@ -89,6 +91,7 @@ export default inject<TStore>(
tenantStatus,
isPortalDeactivate,
enablePortalRename,
baseDomain,
} = settingsStore;
return {
@ -104,6 +107,7 @@ export default inject<TStore>(
isLogout,
isEnterprise,
enablePortalRename,
baseDomain,
};
},
)(observer(PrivateRouteWrapper));

View File

@ -66,6 +66,7 @@ const ArticleBodyContent = (props) => {
isProfileLoading,
limitedAccessSpace,
currentColorScheme,
baseDomain,
} = props;
const [selectedKeys, setSelectedKeys] = React.useState([]);
@ -287,7 +288,7 @@ const ArticleBodyContent = (props) => {
}
}
if (!isOwner) {
if (!isOwner || (baseDomain && baseDomain === "localhost")) {
const index = resultTree.findIndex((n) => n.tKey === "PortalDeletion");
if (index !== -1) {
resultTree.splice(index, 1);
@ -358,6 +359,7 @@ export default inject(
currentDeviceType,
limitedAccessSpace,
currentColorScheme,
baseDomain,
} = settingsStore;
const isProfileLoading =
@ -379,6 +381,7 @@ export default inject(
isProfileLoading,
limitedAccessSpace,
currentColorScheme,
baseDomain,
};
},
)(

View File

@ -55,6 +55,7 @@ export const PrivateRoute = (props: PrivateRouteProps) => {
restricted,
tenantStatus,
enablePortalRename,
baseDomain,
} = props;
const location = useLocation();
@ -121,7 +122,8 @@ export const PrivateRoute = (props: PrivateRouteProps) => {
if (
isLoaded &&
((!isNotPaidPeriod && isPortalUnavailableUrl) ||
(!user?.isOwner && isPortalDeletionUrl) ||
((!user?.isOwner || (baseDomain && baseDomain === "localhost")) &&
isPortalDeletionUrl) ||
(isCommunity && isPaymentsUrl) ||
(isEnterprise && isBonusPage))
) {

View File

@ -49,6 +49,7 @@ export interface PrivateRouteProps
| "isPortalDeactivate"
| "enablePortalRename"
| "limitedAccessSpace"
| "baseDomain"
>,
Pick<CurrentTariffStatusStore, "isNotPaidPeriod">,
Pick<UserStore, "user"> {