-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
_Role object must specified name and ACL #735
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
Conversation
Thanks for catching that one! we've added a 'safer' mechanism for the required keys a few days ago, this required key should be added to here instead. Can you also please add tests? https://github.com/ParsePlatform/parse-server/blob/master/src/Schema.js#L75 |
JavascriptSDK 1.7.1 use serverUrl/classes/_Role directly. So move validation from RolesRouter to ClassesRouter.
@sdf611097 updated the pull request. |
@sdf611097 can you please add the name and ACL to the required columns in Schema as it also provides mechanisms to prevent deleting the value for a required column. The mechanism implemented there is fully tested. |
@flovilmart |
@sdf611097 updated the pull request. |
Nice, leave it like that so errors are generic on the 1st missing column. ACL should be required too AFAIK. |
@sdf611097 updated the pull request. |
CI failed by "Parse.GeoPoint testing geo max distance large". |
@@ -97,10 +96,29 @@ describe('Parse Role testing', () => { | |||
}) | |||
done(); | |||
}, function(err){ | |||
console.log('error?',err); |
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.
Remove log
@sdf611097 updated the pull request. |
_Role object must specified name and ACL
Below curl will response {"code":135,"error":"Role names must be specified."}, but this server will success.
Code 135 not defined in JavascriptSDK 1.7.1.
curl -X POST
-H "X-Parse-Application-Id: XXXXX"
-H "X-Parse-REST-API-Key: XXXXX"
-H "Content-Type: application/json"
-d '{
"ACL": {
"*": {
"read": true
}
}
}'
https://api.parse.com/1/roles