From 21bdea3b7182e57dce6a85c666004ae4facf539f Mon Sep 17 00:00:00 2001 From: Peter Keuter Date: Wed, 24 Jan 2024 10:17:39 +0100 Subject: [PATCH] Groups should be clickable when user has view-access on the group (#26033) Closes #26040 Signed-off-by: Peter Keuter --- js/apps/admin-ui/src/groups/GroupTable.tsx | 8 ++------ js/apps/admin-ui/src/groups/GroupsSection.tsx | 9 ++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/js/apps/admin-ui/src/groups/GroupTable.tsx b/js/apps/admin-ui/src/groups/GroupTable.tsx index c2f7204707..5beb69324d 100644 --- a/js/apps/admin-ui/src/groups/GroupTable.tsx +++ b/js/apps/admin-ui/src/groups/GroupTable.tsx @@ -22,13 +22,9 @@ import { adminClient } from "../admin-client"; type GroupTableProps = { refresh: () => void; - canViewDetails: boolean; }; -export const GroupTable = ({ - refresh: viewRefresh, - canViewDetails, -}: GroupTableProps) => { +export const GroupTable = ({ refresh: viewRefresh }: GroupTableProps) => { const { t } = useTranslation(); const [selectedRows, setSelectedRows] = useState([]); @@ -192,7 +188,7 @@ export const GroupTable = ({ name: "name", displayKey: "groupName", cellRenderer: (group) => - canViewDetails ? ( + group.access?.view ? ( {group.name} diff --git a/js/apps/admin-ui/src/groups/GroupsSection.tsx b/js/apps/admin-ui/src/groups/GroupsSection.tsx index ec1e74dcd9..8631ced048 100644 --- a/js/apps/admin-ui/src/groups/GroupsSection.tsx +++ b/js/apps/admin-ui/src/groups/GroupsSection.tsx @@ -197,10 +197,7 @@ export default function GroupsSection() { eventKey={0} title={{t("childGroups")}} > - + {canViewMembers && ( )} - {subGroups.length === 0 && ( - - )} + {subGroups.length === 0 && }