fix: Fixed an issue where the role array configuration did not work; 🐛

修复:角色数组配置不生效的问题;
This commit is contained in:
chenghongxing 2024-05-08 11:18:56 +08:00
parent 60be8cf4ec
commit 35f0e431b8

View File

@ -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)
}
}