Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Add expandPaths option to en/disable options.as path expansion #30

Merged
merged 3 commits into from
Oct 11, 2017

Conversation

jus101
Copy link
Contributor

@jus101 jus101 commented Sep 28, 2017

Summary

This is an attempt to fix for the issue identified in #22 where nested query properties aren't supported by some DB adapters (namely Mongoose and RethinkDB).

The fix simply adds a new expandPaths option to both the queryWithCurrentUser and restrictToOwner hooks. expandPaths defaults to true to preserve current behaviour. restrictToOwner simply passes the expandPaths option to queryWithCurrentUser for find operations.

@daffl daffl merged commit 5931887 into feathersjs-ecosystem:master Oct 11, 2017
@daffl
Copy link
Member

daffl commented Oct 11, 2017

Thank you! This makes sense and will be released shortly. Would you mind adding it to the documentation at https://docs.feathersjs.com/api/authentication/hooks.html as well?

@ghost
Copy link

ghost commented Oct 16, 2017

@daffl Could you publish this new version in the meantime ? I need it for a current projet on which i'm blocked because of this issue (i'm upgrading from a previous version of feathers)

@daffl
Copy link
Member

daffl commented Oct 16, 2017

If you make a PR against the documentation with a quick note for the option I'll be more than happy to.

@ghost
Copy link

ghost commented Oct 17, 2017

@daffl Here you go. Tell me if it's properly done ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants