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:
Onur
2024-03-05 22:05:54 +03:00
committed by GitHub
parent fe1e4d9775
commit 29624e0fae
8 changed files with 43 additions and 7 deletions

View File

@@ -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.';