From 01dd2846141cacfa6e8ab7e824819dcc6e787b42 Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Fri, 14 Apr 2023 19:00:33 +0000 Subject: [PATCH] Fix Add/Remove collection ignoring repository object permissions Issue: AAH-2305 --- CHANGES/2305.bug | 1 + src/containers/ansible-repository/tab-collection-versions.tsx | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 CHANGES/2305.bug diff --git a/CHANGES/2305.bug b/CHANGES/2305.bug new file mode 100644 index 0000000000..2cd05113d5 --- /dev/null +++ b/CHANGES/2305.bug @@ -0,0 +1 @@ +Fix Add/Remove collection ignoring repository object permissions diff --git a/src/containers/ansible-repository/tab-collection-versions.tsx b/src/containers/ansible-repository/tab-collection-versions.tsx index a41e1ffee9..ba1d0795da 100644 --- a/src/containers/ansible-repository/tab-collection-versions.tsx +++ b/src/containers/ansible-repository/tab-collection-versions.tsx @@ -99,6 +99,8 @@ export const CollectionVersionsTab = ({ setState: setModalState, query, hasPermission, + hasObjectPermission: (p: string): boolean => + item?.my_permissions?.includes?.(p), }} defaultPageSize={10} defaultSort={'name'}