mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
feat(UI): disable access management ui when no roles are linked to entity (#9610)
Co-authored-by: Hendrik Richert <hendrik.richert@swisscom.com>
This commit is contained in:
parent
e484094027
commit
a4418f150f
@ -198,7 +198,11 @@ export class DatasetEntity implements Entity<Dataset> {
|
||||
component: AccessManagement,
|
||||
display: {
|
||||
visible: (_, _1) => this.appconfig().config.featureFlags.showAccessManagement,
|
||||
enabled: (_, _2) => true,
|
||||
enabled: (_, dataset: GetDatasetQuery) => {
|
||||
const accessAspect = dataset?.dataset?.access;
|
||||
const rolesList = accessAspect?.roles;
|
||||
return !!accessAspect && !!rolesList && rolesList.length > 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@ -103,6 +103,13 @@ fragment nonSiblingDatasetFields on Dataset {
|
||||
assertions(start: 0, count: 1) {
|
||||
total
|
||||
}
|
||||
access {
|
||||
roles {
|
||||
role {
|
||||
urn
|
||||
}
|
||||
}
|
||||
}
|
||||
operations(limit: 1) {
|
||||
timestampMillis
|
||||
lastUpdatedTimestamp
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user