diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityRightPanel/EntityRightPanel.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityRightPanel/EntityRightPanel.tsx index 6abd62696cb9..4ea4d8eb39b9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityRightPanel/EntityRightPanel.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityRightPanel/EntityRightPanel.tsx @@ -75,12 +75,24 @@ const EntityRightPanel = ({ }>(); const { domains, dataProducts, id: entityId } = data ?? {}; - + const hasClassificationTags = selectedTags.some( + (tag) => tag.source === TagSource.Classification + ); + const hasGlossaryTags = selectedTags.some( + (tag) => tag.source === TagSource.Glossary + ); + + const shouldShowTags = editTagPermission || hasClassificationTags; + const shouldShowGlossaryTerms = + editGlossaryTermsPermission || hasGlossaryTags; + const shouldShowDataProducts = + showDataProductContainer && + (editDataProductPermission || Boolean(dataProducts?.length)); return ( <> {beforeSlot} - {showDataProductContainer && ( + {shouldShowDataProducts && (
({ />
)} - + {shouldShowTags && (
({ onSelectionChange={onTagSelectionChange} />
- + )} + {shouldShowGlossaryTerms && (
({ onSelectionChange={onTagSelectionChange} />
+ )} {KnowledgeArticles && ( )} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx index 29b4009e3ac7..cad4dfd86d2b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx @@ -493,6 +493,10 @@ const TagsContainerV2 = ({ setTags(getFilterTags(selectedTags)); }, [selectedTags]); + if (newLook && !permission && isEmpty(tags?.[tagType]) && !isEditTags) { + return null; + } + if (newLook) { return (