From 0b8f3f8bd6940c81e04f01883948114d46c2490f Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 25 May 2022 12:09:41 +0800 Subject: [PATCH] fix(client): filter menu item schema by permissions --- .../core/client/src/route-switch/antd/admin-layout/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx index 43bfbbf9e..02405bb65 100644 --- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx @@ -37,6 +37,9 @@ const filterByACL = (schema, options) => { if (element['x-uid'] && !allowMenuItemIds.includes(element['x-uid'])) { delete s.properties[key]; } + if (element['x-uid']) { + filterSchema(element); + } } } };