Skip to content
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

Add afterFind Considerations #821

Merged
merged 2 commits into from
Apr 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _includes/cloudcode/cloud-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ Parse.Cloud.afterFind(Parse.User, async (request) => {
})
```

### Some considerations to be aware of
Copy link
Member

@mtrezza mtrezza Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to make developers aware of security implications, I think we should make a broader change in the docs.

  1. Move this to the already existing Using the Master Key in cloud code section
  2. Refactor the existing section to make it more prominent
  3. Articulate the example in a more general way, because it does not only apply to afterFind and pointers

Changed in #823

- If you use the `masterKey` to fetch a pointer in an `afterFind` trigger, it will be sent in full to the client. Prior to returning to the client, be sure to check that the returned objects and pointers do not contain information that the client should not be able to access

# Session Triggers

## beforeLogin
Expand Down