strongloop / strong-remoting

Communicate between objects in servers, mobile apps, and other servers.
www.strongloop.com
Other
105 stars 93 forks source link

Prioritise auth errors over sharedCtor errors #316

Closed bajtos closed 8 years ago

bajtos commented 8 years ago

Return 401 Not Authorized when making an unauthorised request to a prototype method for a model instance that does not exist.

Potentially breaking change affecting prototype methods:

Hooks registered before "invoke" phase (i.e. "auth" phase and any custom phases inserted before "invoke") will be called even when the model instance was not found. The property "ctx.instance" will be undefined in such case, hook handlers must account for this case.

This is an alternative to #315 that may have less breaking changes.

Connect to #311

@ritch please review.

bajtos commented 8 years ago

Closing in favour of #316

ritch commented 8 years ago

LGTM

ritch commented 8 years ago

Closing in favour of #316

??? I think you meant to close #315

bajtos commented 8 years ago

I think you meant to close #315

Ah, of course, I have reopened this one.

bajtos commented 8 years ago

Landed and released in strong-remoting@2.28.1