Skip to content

Commit 72ef2d6

Browse files
committed
feat(UI): disable access management ui when access aspect is set but no roles
1 parent f7e3915 commit 72ef2d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

datahub-web-react/src/app/entity/dataset/DatasetEntity.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ export class DatasetEntity implements Entity<Dataset> {
139139
component: QueriesTab,
140140
display: {
141141
visible: (_, _1) => true,
142-
enabled: (_, _2) => true,
142+
enabled: (_, dataset: GetDatasetQuery) => {
143+
const accessAspect = dataset?.dataset?.access;
144+
const rolesList = accessAspect?.roles;
145+
return !!accessAspect && !!rolesList && rolesList.length > 0;
146+
},
143147
},
144148
},
145149
{

0 commit comments

Comments
 (0)