- Added Delete Record to the CGridTableRec

This commit is contained in:
Paolo Arena
2019-10-15 20:40:31 +02:00
parent 9120485939
commit 51ef3de29a
5 changed files with 82 additions and 13 deletions

View File

@@ -160,6 +160,14 @@ UserSchema.statics.isAdmin = function (user) {
}
};
UserSchema.statics.isManager = function (user) {
try {
return ((user.perm & shared_consts.Permissions.Manager) === shared_consts.Permissions.Manager);
}catch (e) {
return false
}
};
UserSchema.statics.findByToken = function (token, typeaccess) {
const User = this;
let decoded;