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!