mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-28 01:12:41 +00:00
feat(ui) Update summary page editability (#14822)
This commit is contained in:
parent
941b3c725a
commit
72ee770ae3
@ -11,7 +11,7 @@ const HomePageContent = () => {
|
||||
<ContentContainer>
|
||||
<CenteredContainer>
|
||||
<ContentDiv>
|
||||
{/* <EditHomePageSettingsButton /> */}
|
||||
{/* <EditHomePageSettingsButton /> Editing templates is not enabled in OSS */}
|
||||
<Announcements />
|
||||
<Template />
|
||||
<EditDefaultTemplateBar />
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, { ReactNode, createContext, useContext, useMemo } from 'react';
|
||||
|
||||
import { useEntityData } from '@app/entity/shared/EntityContext';
|
||||
import { useAssetSummaryOperations } from '@app/homeV3/context/hooks/useAssetSummaryOperations';
|
||||
import { useModuleModalState } from '@app/homeV3/context/hooks/useModuleModalState';
|
||||
import { useModuleOperations } from '@app/homeV3/context/hooks/useModuleOperations';
|
||||
@ -18,12 +17,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export const PageTemplateProvider = ({ children, templateType }: Props) => {
|
||||
const { entityData } = useEntityData();
|
||||
const editable = !!entityData?.privileges?.canManageAssetSummary;
|
||||
const isTemplateEditable = useMemo(
|
||||
() => (templateType === PageTemplateSurfaceType.AssetSummary ? editable : false),
|
||||
[editable, templateType],
|
||||
);
|
||||
const isTemplateEditable = false; // template is not editable in OSS
|
||||
// Template state management
|
||||
const {
|
||||
personalTemplate,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user