Merge pull request #406 from strongloop/feature/pause-request-in-shared-ctor

Remove `req.resume` from `app.enableAuth`
This commit is contained in:
Miroslav Bajtoš 2014-08-12 14:02:50 +02:00
commit f431343d6b
1 changed files with 0 additions and 5 deletions

View File

@ -316,17 +316,12 @@ app.enableAuth = function() {
}
if(Model.checkAccess) {
// Pause the request before checking access
// See https://github.com/strongloop/loopback-storage-service/issues/7
req.pause();
Model.checkAccess(
req.accessToken,
modelId,
method,
ctx,
function(err, allowed) {
// Emit any cached data events that fired while checking access.
req.resume();
if(err) {
console.log(err);
next(err);