mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
add a perms utils file
This commit is contained in:
+1
-1
@@ -163,7 +163,7 @@ UserSchema.index({
|
||||
* returns true if a commenter is staff
|
||||
*/
|
||||
UserSchema.method('isStaff', function () {
|
||||
return !!intersection(['ADMIN', 'MODERATOR', 'STAFF'], this.roles).length;
|
||||
return intersection(['ADMIN', 'MODERATOR', 'STAFF'], this.roles).length !== 0;
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user