fix(ui): removed the persona settings option for non-admin users (#13605)

* removed the persona settings option for non-admin users

* replaced the grid container on my data page
This commit is contained in:
Aniket Katkar 2023-10-17 21:31:28 +05:30 committed by GitHub
parent 84a41a6fbf
commit 53576b0a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View File

@ -21,7 +21,7 @@ import React, {
useRef,
useState,
} from 'react';
import { Responsive, WidthProvider } from 'react-grid-layout';
import RGL, { WidthProvider } from 'react-grid-layout';
import { useLocation } from 'react-router-dom';
import AppState from '../../AppState';
import ActivityFeedProvider from '../../components/ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
@ -45,7 +45,7 @@ import { showErrorToast } from '../../utils/ToastUtils';
import { WidgetConfig } from '../CustomizablePage/CustomizablePage.interface';
import './my-data.less';
const ResponsiveGridLayout = WidthProvider(Responsive);
const ReactGridLayout = WidthProvider(RGL);
const MyDataPageV1 = () => {
const location = useLocation();
@ -245,12 +245,10 @@ const MyDataPageV1 = () => {
{isLoading ? (
<Loader />
) : (
<ResponsiveGridLayout
autoSize
breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}
<ReactGridLayout
className="bg-white"
cols={{ lg: 4, md: 4, sm: 4, xs: 4, xxs: 4 }}
draggableHandle=".drag-widget-icon"
cols={4}
isDraggable={false}
isResizable={false}
margin={[
customizePageClassBase.landingPageWidgetMargin,
@ -258,7 +256,7 @@ const MyDataPageV1 = () => {
]}
rowHeight={100}>
{widgets}
</ResponsiveGridLayout>
</ReactGridLayout>
)}
</ActivityFeedProvider>
</div>

View File

@ -104,10 +104,7 @@ export const getGlobalSettingsMenuWithPermission = (
{
label: i18next.t('label.persona-plural'),
isProtected: userPermissions.hasViewPermissions(
ResourceEntity.USER,
permissions
),
isProtected: Boolean(isAdminUser),
key: 'members.persona',
icon: <PersonasIcon className="side-panel-icons" />,
},