Refactored tabletop methods

This commit is contained in:
Stefan Zermatten
2021-10-10 19:58:41 +02:00
parent 51d3fbbcb7
commit eebfbfd636
7 changed files with 165 additions and 185 deletions

View File

@@ -168,12 +168,6 @@ Meteor.users.sendVerificationEmail = new ValidatedMethod({
}
});
Meteor.users.isAdmin = function(userId){
userId = this.userId || userId;
let user = Meteor.users.findOne(userId);
return user && user.roles.includes('admin');
}
Meteor.users.canPickUsername = new ValidatedMethod({
name: 'users.canPickUsername',
validate: userSchema.pick('username').validator(),