From f4a22dc437404558f301ccfc195cf0a300dd1ff2 Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Wed, 25 Jan 2023 18:49:01 +0900 Subject: [PATCH] fix: correctly check mobile menu permissions (#3271) --- src/components/Layout/MobileMenu/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Layout/MobileMenu/index.tsx b/src/components/Layout/MobileMenu/index.tsx index 3732032a6..2ccd75d3d 100644 --- a/src/components/Layout/MobileMenu/index.tsx +++ b/src/components/Layout/MobileMenu/index.tsx @@ -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 (