-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
New: requireAnyUserRoles and requireAllUserRoles for Parse Cloud Validator #7097
New: requireAnyUserRoles and requireAllUserRoles for Parse Cloud Validator #7097
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the standard getUser roles
after adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! thanks for your contribution @dblythy !
@mtrezza @davimacedo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @dblythy ! Please find some comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…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
requireAnyUserRoles
to the inbuilt Parse Cloud validator options. If specified, req.user must have any roles with specified name.requireAllUserRoles
to 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