Add new definition and update tests to reflect

This commit is contained in:
awgeorge
2019-01-28 07:46:36 +00:00
committed by Arthur Cinader
parent 493fc99bcb
commit 95831a5b22
5 changed files with 499 additions and 12 deletions

View File

@@ -343,14 +343,15 @@ function injectDefaults(options: ParseServerOptions) {
options.serverURL = `http://localhost:${options.port}${options.mountPath}`;
}
options.userSensitiveFields = Array.from(
new Set(
options.userSensitiveFields.concat(
defaults.userSensitiveFields,
options.userSensitiveFields
)
)
);
// Backwards compatibility
if (!options.protectedFields && options.userSensitiveFields) {
/* eslint-disable no-console */
console.warn(
`\nDEPRECATED: userSensitiveFields has been replaced by protectedFields allowing the ability to protect fields in all classes with CLP. \n`
);
/* eslint-enable no-console */
options.protectedFields = { _User: { '*': options.userSensitiveFields } };
}
options.masterKeyIps = Array.from(
new Set(