mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: should only do checkRbac if it exists
This commit is contained in:
parent
b7d2cb06ae
commit
2c01fd088b
@ -9,7 +9,7 @@ const checkPermission = permission => {
|
||||
if (!permission) {
|
||||
return next();
|
||||
}
|
||||
if (await req.checkRbac(permission)) {
|
||||
if (req.checkRbac && (await req.checkRbac(permission))) {
|
||||
return next();
|
||||
}
|
||||
return res
|
||||
|
Loading…
Reference in New Issue
Block a user