mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
add a perms utils file
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
const intersection = require('lodash/intersection');
|
||||
const check = (user, roles) => {
|
||||
return intersection(roles, user.roles).length > 0;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
check
|
||||
};
|
||||
Reference in New Issue
Block a user