fix(ui): tour with permission errors on multiple steps (#12511)

This commit is contained in:
Chirag Madlani 2023-07-20 10:33:49 +05:30 committed by GitHub
parent 8e0fc86b4e
commit 8bac9b6ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,16 +567,16 @@ const TableDetailsPageV1 = () => {
), ),
key: EntityTabs.SAMPLE_DATA, key: EntityTabs.SAMPLE_DATA,
children: !( children:
tablePermissions.ViewAll || tablePermissions.ViewSampleData !isTourOpen &&
) ? ( !(tablePermissions.ViewAll || tablePermissions.ViewSampleData) ? (
<ErrorPlaceHolder type={ERROR_PLACEHOLDER_TYPE.PERMISSION} /> <ErrorPlaceHolder type={ERROR_PLACEHOLDER_TYPE.PERMISSION} />
) : ( ) : (
<SampleDataTableComponent <SampleDataTableComponent
isTableDeleted={tableDetails?.deleted} isTableDeleted={tableDetails?.deleted}
tableId={tableDetails?.id ?? ''} tableId={tableDetails?.id ?? ''}
/> />
), ),
}, },
{ {
label: ( label: (
@ -607,19 +607,21 @@ const TableDetailsPageV1 = () => {
/> />
), ),
key: EntityTabs.PROFILER, key: EntityTabs.PROFILER,
children: !( children:
tablePermissions.ViewAll || !isTourOpen &&
tablePermissions.ViewDataProfile || !(
tablePermissions.ViewTests tablePermissions.ViewAll ||
) ? ( tablePermissions.ViewDataProfile ||
<ErrorPlaceHolder type={ERROR_PLACEHOLDER_TYPE.PERMISSION} /> tablePermissions.ViewTests
) : ( ) ? (
<TableProfilerV1 <ErrorPlaceHolder type={ERROR_PLACEHOLDER_TYPE.PERMISSION} />
isTableDeleted={tableDetails?.deleted} ) : (
permissions={tablePermissions} <TableProfilerV1
testSuite={tableDetails?.testSuite} isTableDeleted={tableDetails?.deleted}
/> permissions={tablePermissions}
), testSuite={tableDetails?.testSuite}
/>
),
}, },
{ {
label: <TabsLabel id={EntityTabs.LINEAGE} name={t('label.lineage')} />, label: <TabsLabel id={EntityTabs.LINEAGE} name={t('label.lineage')} />,
@ -860,7 +862,10 @@ const TableDetailsPageV1 = () => {
return <Loader />; return <Loader />;
} }
if (!(tablePermissions.ViewAll || tablePermissions.ViewBasic)) { if (
!(isTourOpen || isTourPage) &&
!(tablePermissions.ViewAll || tablePermissions.ViewBasic)
) {
return ( return (
<ErrorPlaceHolder <ErrorPlaceHolder
className="m-0" className="m-0"