Skip to content

Commit

Permalink
docs: add requireAnyUserRoles and requireAllUserRoles on cloud valida…
Browse files Browse the repository at this point in the history
  • Loading branch information
dblythy committed Mar 17, 2022
1 parent 0ca8a55 commit 587b930
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 587b930

Please sign in to comment.