feat: Deprecation DEPPS5: Config option allowClientClassCreation defaults to false (#8849)
BREAKING CHANGE: The Parse Server option `allowClientClassCreation` defaults to `false`.
This commit is contained in:
@@ -90,6 +90,7 @@ export class Config {
|
||||
rateLimit,
|
||||
databaseOptions,
|
||||
extendSessionOnUse,
|
||||
allowClientClassCreation,
|
||||
}) {
|
||||
if (masterKey === readOnlyMasterKey) {
|
||||
throw new Error('masterKey and readOnlyMasterKey should be different');
|
||||
@@ -132,6 +133,7 @@ export class Config {
|
||||
this.validateRateLimit(rateLimit);
|
||||
this.validateLogLevels(logLevels);
|
||||
this.validateDatabaseOptions(databaseOptions);
|
||||
this.validateAllowClientClassCreation(allowClientClassCreation);
|
||||
}
|
||||
|
||||
static validateControllers({
|
||||
@@ -174,6 +176,12 @@ export class Config {
|
||||
}
|
||||
}
|
||||
|
||||
static validateAllowClientClassCreation(allowClientClassCreation) {
|
||||
if (typeof allowClientClassCreation !== 'boolean') {
|
||||
throw 'Parse Server option allowClientClassCreation must be a boolean.';
|
||||
}
|
||||
}
|
||||
|
||||
static validateSecurityOptions(security) {
|
||||
if (Object.prototype.toString.call(security) !== '[object Object]') {
|
||||
throw 'Parse Server option security must be an object.';
|
||||
|
||||
Reference in New Issue
Block a user