Fix for issue 1099.

Signed-off-by: zane <zane.mccaig@mail.mcgill.ca>
This commit is contained in:
zane 2015-02-18 11:05:53 -04:00
parent ea35a2f48d
commit 39560b9ce6
1 changed files with 5 additions and 2 deletions

View File

@ -104,9 +104,12 @@ module.exports = function(Role) {
}); });
function isUserClass(modelClass) { function isUserClass(modelClass) {
if (modelClass) {
return modelClass === loopback.User || return modelClass === loopback.User ||
modelClass.prototype instanceof loopback.User; modelClass.prototype instanceof loopback.User;
} }
else return false;
}
/*! /*!
* Check if two user ids matches * Check if two user ids matches