Skip to content

Commit

Permalink
fix: correctly check mobile menu permissions (#3271)
Browse files Browse the repository at this point in the history
  • Loading branch information
sct committed Jan 25, 2023
1 parent 5d1c6f7 commit f4a22dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Layout/MobileMenu/index.tsx
Expand Up @@ -118,7 +118,11 @@ const MobileMenu = () => {
];

const filteredLinks = menuLinks.filter(
(link) => !link.requiredPermission || hasPermission(link.requiredPermission)
(link) =>
!link.requiredPermission ||
hasPermission(link.requiredPermission, {
type: link.permissionType ?? 'and',
})
);

return (
Expand Down

0 comments on commit f4a22dc

Please sign in to comment.