-
-
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
Query retrieves objects with empty ACL without master key #504
Comments
After few experiments with data export from Parse.com Dashboard I see that records with ACL column "Master key only" would be exported as mongo documents with field "ACL": {}. Records with "Public Read + Write" has no ACL field at all. I think we need to add backwards compatibility in function transform.js/transformCreate for storing objects: if (JSON.stringify(restCreate["ACL"]) == "{}") {
mongoCreate["ACL"] = {};
} and in function ExportAdapter.js/find for retrieving: if (!isMaster) {
...
var emptyACLCondition = {"ACL" : { "$ne" : {} }};
mongoWhere = {'$and': [emptyACLCondition, mongoWhere, {'$or': orParts}]};
} |
Good catch... I have submitted #586 to correct the behavior of ACLs, it will be in 2.1.3. |
Objects with empty or non-existing ACL presents in ParseQuery::find results.
For example look at this test
$count will be 1 after running code with local parse-server and 0 - with api.parse.com.
I mean that problem is here: this request transforms to mongo query
which just returns all documents without _rperm field and doesn't care about ACL field.
The text was updated successfully, but these errors were encountered: