Skip to content

Commit

Permalink
fix(RederWrapper): ESSNTL-4954 - Remove check for all permissions (#1900
Browse files Browse the repository at this point in the history
)

The permissions are too strict, this high up.
Read permissions should be enough to view an inventory component.
  • Loading branch information
bastilian authored Jun 19, 2023
1 parent 6c1f0d1 commit 4231e9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Utilities/Wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ import { usePermissionsWithContext } from '@redhat-cloud-services/frontend-compo

const RenderWrapper = ({ cmp: Component, isRbacEnabled, inventoryRef, store, ...props }) => {
const { hasAccess } = usePermissionsWithContext([
'inventory:*:*',
'inventory:*:read',
'inventory:hosts:read'
]);

return (
<Component
{...props}
{ ...inventoryRef && {
{...inventoryRef && {
ref: inventoryRef
}}
isRbacEnabled={isRbacEnabled}
hasAccess={isRbacEnabled ? hasAccess : true}
store={ store }
store={store}
/>
);
};
Expand Down

0 comments on commit 4231e9d

Please sign in to comment.