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:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user