diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/EntityTypeMapper.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/EntityTypeMapper.java index eee9ea7fce34f..5427ac149db63 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/EntityTypeMapper.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/EntityTypeMapper.java @@ -13,7 +13,8 @@ public class EntityTypeMapper { static final Map ENTITY_TYPE_TO_NAME = - ImmutableMap.builder().put(EntityType.DATASET, "dataset") + ImmutableMap.builder() + .put(EntityType.DATASET, "dataset") .put(EntityType.CORP_USER, "corpuser") .put(EntityType.CORP_GROUP, "corpGroup") .put(EntityType.DATA_PLATFORM, "dataPlatform") diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/config/AppConfigResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/config/AppConfigResolver.java index f74aa4df5b0f6..ca31482ad59b8 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/config/AppConfigResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/config/AppConfigResolver.java @@ -114,6 +114,10 @@ private EntityType mapResourceTypeToEntityType(final String resourceType) { return EntityType.DOMAIN; } else if (com.linkedin.metadata.authorization.PoliciesConfig.CONTAINER_PRIVILEGES.getResourceType().equals(resourceType)) { return EntityType.CONTAINER; + } else if (com.linkedin.metadata.authorization.PoliciesConfig.CORP_GROUP_PRIVILEGES.getResourceType().equals(resourceType)) { + return EntityType.CORP_GROUP; + } else if (com.linkedin.metadata.authorization.PoliciesConfig.CORP_USER_PRIVILEGES.getResourceType().equals(resourceType)) { + return EntityType.CORP_USER; } else { return null; } diff --git a/datahub-web-react/src/app/entity/group/GroupOwnerSideBarSection.tsx b/datahub-web-react/src/app/entity/group/GroupOwnerSideBarSection.tsx index 4b3ec940e199a..6fad53f42fc81 100644 --- a/datahub-web-react/src/app/entity/group/GroupOwnerSideBarSection.tsx +++ b/datahub-web-react/src/app/entity/group/GroupOwnerSideBarSection.tsx @@ -11,9 +11,7 @@ const TITLE = 'Owners'; const SectionWrapper = styled.div``; -const AddOwnerButton = styled(Button)` - padding-left: 0px; -`; +const AddOwnerButton = styled(Button)``; type Props = { ownership: Ownership; @@ -39,10 +37,18 @@ export default function GroupOwnerSideBarSection({ urn, ownership, refetch }: Pr {ownersEmpty && ( No group owners added yet. )} - setShowAddModal(true)}> - - Add Owner - + {ownersEmpty && ( + setShowAddModal(true)}> + + Add Owner + + )} + {!ownersEmpty && ( + setShowAddModal(true)}> + + Add Owner + + )} { return ( - {entityRegistry.getDisplayName(result.entity.type, result.entity)} + {entityRegistry.getDisplayName(result.entity.type, result.entity)} `/${entityRegistry.getPathName(result.entity.type)}/${result.entity.urn}`} > View - {' '} + ); }; @@ -189,6 +193,7 @@ export default function PolicyActorForm({ policyType, actors, setActors }: Props onSelectResource(asset)} onDeselect={(asset: any) => onDeselectResource(asset)} diff --git a/datahub-web-react/src/app/shared/ManageAccount.tsx b/datahub-web-react/src/app/shared/ManageAccount.tsx index 02d412402ca85..e6890437a014e 100644 --- a/datahub-web-react/src/app/shared/ManageAccount.tsx +++ b/datahub-web-react/src/app/shared/ManageAccount.tsx @@ -27,8 +27,8 @@ const MenuItem = styled(Menu.Item)` `; const DownArrow = styled(CaretDownOutlined)` - vertical-align: -5px; - font-size: 16px; + vertical-align: -3px; + font-size: 12px; color: ${ANTD_GRAY[7]}; `; diff --git a/datahub-web-react/src/app/shared/admin/AdminHeaderLinks.tsx b/datahub-web-react/src/app/shared/admin/AdminHeaderLinks.tsx index 981c11eab7b1a..672114f3952da 100644 --- a/datahub-web-react/src/app/shared/admin/AdminHeaderLinks.tsx +++ b/datahub-web-react/src/app/shared/admin/AdminHeaderLinks.tsx @@ -46,15 +46,6 @@ export function AdminHeaderLinks() { )} - {showPolicyBuilder && ( - - - - - - )} {showDomains && ( @@ -82,11 +73,20 @@ export function AdminHeaderLinks() { )} - {showSettings && ( + {showPolicyBuilder && ( + + + + + )} + {showSettings && ( + diff --git a/metadata-service/war/src/main/resources/boot/policies.json b/metadata-service/war/src/main/resources/boot/policies.json index 86bf73796a3b2..0bfee57a04f88 100644 --- a/metadata-service/war/src/main/resources/boot/policies.json +++ b/metadata-service/war/src/main/resources/boot/policies.json @@ -185,10 +185,13 @@ "allGroups":false }, "privileges":[ - "VIEW_ANALYTICS", "MANAGE_POLICIES", + "MANAGE_INGESTION", + "MANAGE_SECRETS", "MANAGE_USERS_AND_GROUPS", - "GENERATE_PERSONAL_ACCESS_TOKENS" + "VIEW_ANALYTICS", + "GENERATE_PERSONAL_ACCESS_TOKENS", + "MANAGE_DOMAINS" ], "displayName":"All Users - All Platform Privileges", "description":"Grants full platform privileges to ALL users of DataHub. Change this policy to alter that behavior.",