javascript - How to determine if Loopback model access is internal or external? -


i'm using loopback, , i'm trying figure out how can tell in operational hook if model being accessed result of query original end point or through relationship.

i have custom filtering doing unrelated acl, , works when querying specific endpoint. however, has been causing issues when querying endpoint, , including related models. thus, i'd able detect when model being accessed via relationship, , disable filtering these instances.

any suggestions on how go doing this?

thanks in advance!


Popular posts from this blog

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -