Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return route.whitelist.find(mask => {
if (_.isString(mask))
return match(action, mask);
else if (_.isRegExp(mask))
return mask.test(action);
}) != null;
},
return whitelist.find(mask => {
if (_.isString(mask)) {
return match(action, mask)
}
else if (_.isRegExp(mask)) {
return mask.test(action)
}
}) != null
}
return permList.some(p => match(permission, p));
},
return allItems.filter(item => match(item.key, mask));
},
return permissions.some(perm => permList.find(p => match(perm, p)));
},