Ensure the ACL is always part of the payload when using select (#4967)

* Ensure the ACL is always part of the payload when using select

* Update changelog

* fix for PG
This commit is contained in:
Florent Vilmart
2018-08-15 09:48:32 -04:00
committed by GitHub
parent af45b4df74
commit bf9fdb41ed
5 changed files with 53 additions and 6 deletions

View File

@@ -470,7 +470,12 @@ export class MongoStorageAdapter implements StorageAdapter {
const mongoWhere = transformWhere(className, query, schema);
const mongoSort = _.mapKeys(sort, (value, fieldName) => transformKey(className, fieldName, schema));
const mongoKeys = _.reduce(keys, (memo, key) => {
memo[transformKey(className, key, schema)] = 1;
if (key === 'ACL') {
memo['_rperm'] = 1;
memo['_wperm'] = 1;
} else {
memo[transformKey(className, key, schema)] = 1;
}
return memo;
}, {});