diff --git a/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.resolver.ts b/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.resolver.ts index 15f6912b61..d534be7c9b 100644 --- a/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.resolver.ts @@ -114,6 +114,7 @@ export class EntityGroupsTableConfigResolver { return this.edgeService.getEdge(config.edgeId).pipe( map((info) => { config.tableTitle = info.name + ': ' + this.translate.instant(entityGroupsTitle(config.groupType)); + config.edgeOwnerId = info.ownerId; return config; }) ); diff --git a/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.ts b/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.ts index be3ffd2313..53b369e99b 100644 --- a/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.ts +++ b/ui-ngx/src/app/modules/home/components/group/entity-groups-table-config.ts @@ -30,10 +30,12 @@ import { EntityId } from '@shared/models/id/entity-id'; import { CustomTranslatePipe } from '@shared/pipe/custom-translate.pipe'; import { AuthUser } from '@shared/models/user.model'; import { edgeCreationAllowed } from '@shared/models/edge.models'; +import { Authority } from '@shared/models/authority.enum'; export class EntityGroupsTableConfig extends EntityTableConfig { edgeId: string; + edgeOwnerId: EntityId; groupType: EntityType; shared: boolean; @@ -288,7 +290,13 @@ export class EntityGroupsTableConfig extends EntityTableConfig $event.stopPropagation(); } let ownerId = this.userPermissionsService.getUserOwnerId(); - if (this.params.customerId) { + if (this.edgeOwnerId && this.authUser.authority === Authority.TENANT_ADMIN) { + // List groups of the edge owner and its parent owners, so the groups of the customer that owns the edge are + // available no matter which page the edge was opened from (Edge management or Customers). + // Tenant admin only: for a customer user the edge owner may be outside their owner chain (an edge shared + // from the tenant or a parent customer), and the hierarchy request is then denied + ownerId = this.edgeOwnerId; + } else if (this.params.customerId) { ownerId = { id: this.params.customerId, entityType: EntityType.CUSTOMER