New: requireAnyUserRoles and requireAllUserRoles for Parse Cloud Validator#7097
New: requireAnyUserRoles and requireAllUserRoles for Parse Cloud Validator#7097davimacedo merged 12 commits intoparse-community:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7097 +/- ##
==========================================
+ Coverage 93.98% 94.04% +0.06%
==========================================
Files 172 172
Lines 12834 12849 +15
==========================================
+ Hits 12062 12084 +22
+ Misses 772 765 -7
Continue to review full report at Codecov.
|
Moumouls
left a comment
There was a problem hiding this comment.
use the standard getUser roles
|
after adding |
Moumouls
left a comment
There was a problem hiding this comment.
LGTM ! thanks for your contribution @dblythy !
@mtrezza @davimacedo ?
davimacedo
left a comment
There was a problem hiding this comment.
Nice job @dblythy ! Please find some comments below.
…dator (#7097) * new: requireUserRole for Parse Cloud Validator * change to requireUserRoles * Update CHANGELOG.md * revoke triggers * Update triggers.js * Update ParseLiveQueryServer.js * Update ParseLiveQueryServer.js * create requireUserRoles * rename to requireAny and requireAll * allow for a function
|
🎉 This change has been released in version 5.0.0-beta.1 |
|
🎉 This change has been released in version 5.0.0 |
New Pull Request Checklist
Issue Description
requireAnyUserRolesto the inbuilt Parse Cloud validator options. If specified, req.user must have any roles with specified name.requireAllUserRolesto the inbuilt Parse Cloud validator options. If specified, req.user must have all roles with specified name.You can also set these parameters to a function (async too) that returns an array of role names.
Related issue: #7093
TODOs before merging