webpack/components/extensions/HostDetails/hostDetailsHelpers.js in katello-4.5.1 vs webpack/components/extensions/HostDetails/hostDetailsHelpers.js in katello-4.6.0.rc1

- old
+ new

@@ -33,10 +33,10 @@ return { ...hostPermissions, ...cfAttributes?.permissions }; }; // requiredPermissions is an array // userPermissions is an object, e.g. { view_hosts: true } -export const hasRequiredPermissions = (requiredPermissions = [], userPermissions) => { +export const hasRequiredPermissions = (requiredPermissions = [], userPermissions = {}) => { const permittedActions = Object.keys(userPermissions).filter(key => userPermissions[key]); return requiredPermissions.every(permission => permittedActions.includes(permission)); }; export const missingRequiredPermissions = (requiredPermissions = [], userPermissions) =>