feat: Add compatibility for MongoDB Atlas Serverless and AWS Amazon DocumentDB with collation options enableCollationCaseComparison, transformEmailToLowercase, transformUsernameToLowercase (#8805)
This commit is contained in:
@@ -139,6 +139,20 @@ module.exports.ParseServerOptions = {
|
||||
help: 'A collection prefix for the classes',
|
||||
default: '',
|
||||
},
|
||||
convertEmailToLowercase: {
|
||||
env: 'PARSE_SERVER_CONVERT_EMAIL_TO_LOWERCASE',
|
||||
help:
|
||||
'Optional. If set to `true`, the `email` property of a user is automatically converted to lowercase before being stored in the database. Consequently, queries must match the case as stored in the database, which would be lowercase in this scenario. If `false`, the `email` property is stored as set, without any case modifications. Default is `false`.',
|
||||
action: parsers.booleanParser,
|
||||
default: false,
|
||||
},
|
||||
convertUsernameToLowercase: {
|
||||
env: 'PARSE_SERVER_CONVERT_USERNAME_TO_LOWERCASE',
|
||||
help:
|
||||
'Optional. If set to `true`, the `username` property of a user is automatically converted to lowercase before being stored in the database. Consequently, queries must match the case as stored in the database, which would be lowercase in this scenario. If `false`, the `username` property is stored as set, without any case modifications. Default is `false`.',
|
||||
action: parsers.booleanParser,
|
||||
default: false,
|
||||
},
|
||||
customPages: {
|
||||
env: 'PARSE_SERVER_CUSTOM_PAGES',
|
||||
help: 'custom pages for password validation and reset',
|
||||
@@ -203,6 +217,13 @@ module.exports.ParseServerOptions = {
|
||||
action: parsers.booleanParser,
|
||||
default: true,
|
||||
},
|
||||
enableCollationCaseComparison: {
|
||||
env: 'PARSE_SERVER_ENABLE_COLLATION_CASE_COMPARISON',
|
||||
help:
|
||||
'Optional. If set to `true`, the collation rule of case comparison for queries and indexes is enabled. Enable this option to run Parse Server with MongoDB Atlas Serverless or AWS Amazon DocumentDB. If `false`, the collation rule of case comparison is disabled. Default is `false`.',
|
||||
action: parsers.booleanParser,
|
||||
default: false,
|
||||
},
|
||||
enableExpressErrorHandler: {
|
||||
env: 'PARSE_SERVER_ENABLE_EXPRESS_ERROR_HANDLER',
|
||||
help: 'Enables the default express error handler for all errors',
|
||||
|
||||
Reference in New Issue
Block a user