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

@@ -148,10 +148,17 @@ module.exports.ParseServerOptions = {
userSensitiveFields: {
env: 'PARSE_SERVER_USER_SENSITIVE_FIELDS',
help:
'Personally identifiable information fields in the user table the should be removed for non-authorized users.',
'Personally identifiable information fields in the user table the should be removed for non-authorized users. **Deprecated** @see protectedFields',
action: parsers.arrayParser,
default: ['email'],
},
protectedFields: {
env: 'PARSE_SERVER_PROTECTED_FIELDS',
help:
'Personally identifiable information fields in the user table the should be removed for non-authorized users.',
action: parsers.objectParser,
//default: {"_User": {"*": ["email"]}} // For backwards compatiability, do not use a default here.
},
enableAnonymousUsers: {
env: 'PARSE_SERVER_ENABLE_ANON_USERS',
help: 'Enable (or disable) anon users, defaults to true',

View File

@@ -81,9 +81,12 @@ export interface ParseServerOptions {
:ENV: PARSE_SERVER_PRESERVE_FILE_NAME
:DEFAULT: false */
preserveFileName: ?boolean;
/* Personally identifiable information fields in the user table the should be removed for non-authorized users.
/* Personally identifiable information fields in the user table the should be removed for non-authorized users. Deprecated @see protectedFields
:DEFAULT: ["email"] */
userSensitiveFields: ?(string[]);
/* Protected fields that should be treated with extra security when fetching details.
:DEFAULT: {"_User": {"*": ["email"]}} */
protectedFields: ?any;
/* Enable (or disable) anon users, defaults to true
:ENV: PARSE_SERVER_ENABLE_ANON_USERS
:DEFAULT: true */