Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks

Home Page:https://atmospherejs.com/matb33/collection-hooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

defaultUserId always gets overridden

hluz opened this issue · comments

commented

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

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 b0191f0. 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.

commented

0.9.0-rc.4 does it! Many thanks for quick response.