Skip to content

Commit 587b930

Browse files
authoredMar 17, 2022
docs: add requireAnyUserRoles and requireAllUserRoles on cloud validator (#816)
1 parent 0ca8a55 commit 587b930

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎_includes/cloudcode/cloud-code.md

+2
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ The full range of built-in Validation Options are:
216216
- `requireUser`: whether the function requires a `request.user` to run.
217217
- `validateMasterKey`: whether the validator should run on `masterKey` (defaults to false).
218218
- `fields`: an `Array` or `Object` of fields that are required on the request.
219+
- `requireAnyUserRoles`: an `Array` or `function` that returns an array. `request.user` must match one of the specified roles.
220+
- `requireAllUserRoles`: an `Array` or `function` that returns an array. `request.user` must match all of the specified roles.
219221
- `requireUserKeys`: an `Array` of fields to be validated on `request.user`.
220222

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

0 commit comments

Comments
 (0)
Please sign in to comment.