Skip to content

Allow select (keys) to be altered in beforeFind hook #3145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
acinader opened this issue Nov 30, 2016 · 0 comments · Fixed by #3146
Closed

Allow select (keys) to be altered in beforeFind hook #3145

acinader opened this issue Nov 30, 2016 · 0 comments · Fixed by #3146

Comments

@acinader
Copy link
Contributor

acinader commented Nov 30, 2016

Any changes to the select value of a query (i.e. what fields to return) are ignored in the beforeFind hook.

The backstory on this change: If a call is made to classes/_Users, the returned object contains sensitive info, i.e. email addresses that should not be able to be retrieved without the master key (or by the user herself on her own record.)

So there may be a better way to solve this problem (I'm all ears!), but my solution was to use a beforeFind hook and only select non-sensitive fields (a little simplified, but you get the idea).

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

Successfully merging a pull request may close this issue.

1 participant