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

docs: add requireAnyUserRoles and requireAllUserRoles on cloud validator #816

Merged
merged 2 commits into from
Mar 17, 2022
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
2 changes: 2 additions & 0 deletions _includes/cloudcode/cloud-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ The full range of built-in Validation Options are:
- `requireUser`: whether the function requires a `request.user` to run.
- `validateMasterKey`: whether the validator should run on `masterKey` (defaults to false).
- `fields`: an `Array` or `Object` of fields that are required on the request.
- `requireAnyUserRoles`: an `Array` or `function` that returns an array. `request.user` must match one of the specified roles.
- `requireAllUserRoles`: an `Array` or `function` that returns an array. `request.user` must match all of the specified roles.
- `requireUserKeys`: an `Array` of fields to be validated on `request.user`.

The full range of built-in Validation Options on `.fields` are:
Expand Down