Ensured admin can always PM user (#9653)

* Ensured admin can always PM user

* Fixed lint issues

* Updated admin check and removed async

* Removed console log
This commit is contained in:
Keith Holliday
2017-12-11 11:48:17 -06:00
committed by GitHub
parent 2dfcda068b
commit 2570c59130
3 changed files with 58 additions and 1 deletions

View File

@@ -313,3 +313,7 @@ schema.methods.isMemberOfGroupPlan = async function isMemberOfGroupPlan () {
return g.isSubscribed();
});
};
schema.methods.isAdmin = function isAdmin () {
return this.contributor && this.contributor.admin;
};