From 35f0e431b8aa531dc9ae4eead5b0142f710f939b Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Wed, 8 May 2024 11:18:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fixed=20an=20issue=20where=20the=20role?= =?UTF-8?q?=20array=20configuration=20did=20not=20work;=20:bug:=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=A7=92=E8=89=B2=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/authority-plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/authority-plugin.js b/src/plugins/authority-plugin.js index 429a545..210c385 100644 --- a/src/plugins/authority-plugin.js +++ b/src/plugins/authority-plugin.js @@ -39,9 +39,9 @@ const auth = function(authConfig, permission, role, permissions, roles) { if (type === 'permission') { return checkFromPermission(check, permission) } else if (type === 'role') { - return checkFromRoles(check, role) + return checkFromRoles(check, roles) } else { - return checkFromPermission(check, permission) || checkFromRoles(check, role) + return checkFromPermission(check, permission) || checkFromRoles(check, roles) } }