Closed hluz closed 7 years ago
Yeah, seems that would result in it always being the overridden with the contexts userId even if that is null
or undefined
.
Should be solved with b0191f0786a5dd7e3a1bfad6450b823b65859fef. Try 0.9.0-rc.4
and see if that solves if for you, also keep in mind that 0.9.0
contains some "breaking" changes also so have a look in History.md
to see what those are.
0.9.0-rc.4
does it! Many thanks for quick response.
CollectionHooks.defaultUserId does not appear to "stick". Always gets overriden by the userId of the context even when there is no context.
Scenario is exactly what the CollectionHooks.defaultUserId is supposed to cover: API end point where User id is derived from a token.
Code block appears to confirm this: https://github.com/matb33/meteor-collection-hooks/blob/master/collection-hooks.js#L28-L51