Set default protectedFields and remove previous filter logic

This commit is contained in:
awgeorge
2019-01-28 07:50:21 +00:00
committed by Arthur Cinader
parent 95831a5b22
commit b343de0c70
8 changed files with 91 additions and 14 deletions

View File

@@ -62,6 +62,7 @@ const emptyCLPS = Object.freeze({
update: {},
delete: {},
addField: {},
protectedFields: {},
});
const defaultCLPS = Object.freeze({
@@ -71,6 +72,7 @@ const defaultCLPS = Object.freeze({
update: { '*': true },
delete: { '*': true },
addField: { '*': true },
protectedFields: { '*': [] },
});
function mongoSchemaToParseSchema(mongoSchema) {