strongloop / loopback-example-access-control

An example demonstrating LoopBack access control mechanisms.
Other
370 stars 168 forks source link

ownerId is not in the roles #60

Closed wesleymilan closed 8 years ago

wesleymilan commented 9 years ago

I'm trying to apply this example inside my project, and after one week looking for solutions, documents and examples I decided look inside role.js and found this:

165: var ownerId = inst.userId || inst.owner;

So the "ownerId" in this example does not work because role.js just look for userId or owner field.

And the next step in line 173 that looks for relations does not work either, because I tried to use ownerId that should be matched in this point and it's fail.

richardpringle commented 8 years ago

Hey @wesleymilan, this issue has actually already been posted (and a fix is currently in progress). See #issue-8.

Thanks! Hopefully we'll have everything fixed soon.