hook access loopback

JavaScript
// it is not availabe in the "before save" event.
// you must do a Model.find()Model.observe('access', function logQuery(ctx, next) {
  console.log('Accessing %s matching %s', ctx.Model.modelName, ctx.query.where);
  next();
});
Source

Also in JavaScript: