Skip to content

Commit 166bdd6

Browse files
committed
feat(ui): show access management tab for containers
1 parent c845791 commit 166bdd6

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

datahub-web-react/src/app/entityV2/container/ContainerEntity.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppstoreOutlined, FileOutlined, FolderOutlined } from '@ant-design/icons';
1+
import { AppstoreOutlined, FileOutlined, FolderOutlined, UnlockOutlined } from '@ant-design/icons';
22
import { ListBullets } from '@phosphor-icons/react';
33
import * as React from 'react';
44

@@ -27,6 +27,8 @@ import { DocumentationTab } from '@app/entityV2/shared/tabs/Documentation/Docume
2727
import { PropertiesTab } from '@app/entityV2/shared/tabs/Properties/PropertiesTab';
2828
import { getDataProduct, isOutputPort } from '@app/entityV2/shared/utils';
2929
import { capitalizeFirstLetterOnly } from '@app/shared/textUtil';
30+
import { useAppConfig } from '@app/useAppConfig';
31+
import AccessManagement from "@app/entity/shared/tabs/Dataset/AccessManagement/AccessManagement";
3032

3133
import { GetContainerQuery, useGetContainerQuery } from '@graphql/container.generated';
3234
import { Container, EntityType, SearchResult } from '@types';
@@ -83,6 +85,8 @@ export class ContainerEntity implements Entity<Container> {
8385

8486
useEntityQuery = useGetContainerQuery;
8587

88+
appconfig = useAppConfig;
89+
8690
renderProfile = (urn: string) => (
8791
<EntityProfile
8892
urn={urn}
@@ -117,6 +121,20 @@ export class ContainerEntity implements Entity<Container> {
117121
component: PropertiesTab,
118122
icon: ListBullets,
119123
},
124+
{
125+
name: 'Access',
126+
component: AccessManagement,
127+
icon: UnlockOutlined,
128+
display: {
129+
visible: (_, container: GetContainerQuery) => {
130+
return (
131+
this.appconfig().config.featureFlags.showAccessManagement &&
132+
!!container?.container?.access
133+
);
134+
},
135+
enabled: (_, _2) => true,
136+
},
137+
},
120138
]}
121139
sidebarSections={this.getSidebarSections()}
122140
sidebarTabs={this.getSidebarTabs()}

datahub-web-react/yarn.lock

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6540,20 +6540,10 @@ camelize@^1.0.0:
65406540
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
65416541
integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=
65426542

6543-
caniuse-lite@^1.0.30001503:
6544-
version "1.0.30001508"
6545-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz#4461bbc895c692a96da399639cc1e146e7302a33"
6546-
integrity sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==
6547-
6548-
caniuse-lite@^1.0.30001541:
6549-
version "1.0.30001559"
6550-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz#95a982440d3d314c471db68d02664fb7536c5a30"
6551-
integrity sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==
6552-
6553-
caniuse-lite@^1.0.30001669:
6554-
version "1.0.30001687"
6555-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz#d0ac634d043648498eedf7a3932836beba90ebae"
6556-
integrity sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==
6543+
caniuse-lite@^1.0.30001503, caniuse-lite@^1.0.30001541, caniuse-lite@^1.0.30001669:
6544+
version "1.0.30001727"
6545+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz"
6546+
integrity sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==
65576547

65586548
capital-case@^1.0.4:
65596549
version "1.0.4"

docker/datahub-gms/env/docker.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ UI_INGESTION_ENABLED=true
2929
THEME_V2_DEFAULT=true
3030
ELASTICSEARCH_LIMIT_RESULTS_STRICT=true
3131

32+
SHOW_ACCESS_MANAGEMENT=true
33+
3234
# Uncomment to disable Metadata Service Authentication
3335
# METADATA_SERVICE_AUTH_ENABLED=false
3436

docker/quickstart/docker-compose.quickstart-profile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ services:
7373
NEO4J_USERNAME: neo4j
7474
PE_CONSUMER_ENABLED: 'true'
7575
SCHEMA_REGISTRY_TYPE: INTERNAL
76+
SHOW_ACCESS_MANAGEMENT: 'true'
7677
STRICT_URN_VALIDATION_ENABLED: 'true'
7778
THEME_V2_DEFAULT: 'true'
7879
UI_INGESTION_ENABLED: 'true'

smoke-test/set-test-env-vars.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export DATAHUB_KAFKA_SCHEMA_REGISTRY_URL=http://localhost:8080/schema-registry/api
2-
export DATAHUB_GMS_URL=http://localhost:8080
2+
export DATAHUB_GMS_URL=http://localhost:8080''

0 commit comments

Comments
 (0)