mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 17:35:42 +08:00
9 lines
173 B
JavaScript
9 lines
173 B
JavaScript
const intersection = require('lodash/intersection');
|
|
const check = (user, roles) => {
|
|
return intersection(roles, user.roles).length > 0;
|
|
};
|
|
|
|
module.exports = {
|
|
check
|
|
};
|