Move acl adding into parse server (#1601)

* Move writeACL knowledge out of mongoAdapter

* Remove write ACL from mongo adapter

* Remove readACL from Mongo Transform
This commit is contained in:
Drew
2016-04-22 18:44:03 -07:00
committed by Florent Vilmart
parent d33dd68cc5
commit d14d451028
3 changed files with 25 additions and 22 deletions

View File

@@ -916,14 +916,6 @@ function transformNotInQuery(notInQueryObject, className, results) {
}
}
function addWriteACL(mongoWhere, acl) {
return {'$and': [mongoWhere, {"_wperm" : { "$in" : [null, ...acl]}}]};
}
function addReadACL(mongoWhere, acl) {
return {'$and': [mongoWhere, {"_rperm" : { "$in" : [null, "*", ...acl]}}]};
}
var DateCoder = {
JSONToDatabase(json) {
return new Date(json.iso);
@@ -1021,7 +1013,5 @@ module.exports = {
transformDontSelect,
transformInQuery,
transformNotInQuery,
addReadACL,
addWriteACL,
untransformObject
};