mirror of
https://github.com/wassname/talk.git
synced 2026-07-28 11:27:05 +08:00
merge master
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
module.exports = {
|
||||
checkRoles: function (user /* , perm*/) {
|
||||
module.exports = (user /* , perm*/) => {
|
||||
|
||||
// this runs before everything
|
||||
if (user.status === 'BANNED') {
|
||||
return false;
|
||||
}
|
||||
// this runs before everything
|
||||
if (
|
||||
user.status === 'BANNED' ||
|
||||
(user.suspension.until && user.suspension.until > new Date())
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user