From 84930b27fa19f8625b7a9a9151cc18d5415f6adf Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 17 Jun 2021 14:47:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/role.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/role.js b/src/utils/role.js index 9a1fd646d..26915a544 100644 --- a/src/utils/role.js +++ b/src/utils/role.js @@ -80,6 +80,11 @@ export function hasUserPagePerm(userPerm) { } export function hasPerm(source, target) { + if (target === null) { + return true + } else if (source === null) { + return false + } if (typeof source !== 'object') { source = [source] }