⚡ Release 2.5.2 (#3985)
* Adds ability to configure cache from cli * dont use array.includes for node 4.6 * Changelog and version bump * Removes runtime check for version * Build releases on 4.6
This commit is contained in:
@@ -45,7 +45,7 @@ jobs:
|
||||
include:
|
||||
# release on github latest branch
|
||||
- stage: release
|
||||
node_js: '6.10'
|
||||
node_js: '4.6'
|
||||
env:
|
||||
before_script: skip
|
||||
after_script: skip
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
## Parse Server Changelog
|
||||
|
||||
### 2.5.2
|
||||
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.1...2.5.2)
|
||||
|
||||
#### Improvements:
|
||||
* Restores ability to run on node >= 4.6
|
||||
* Adds ability to configure cache from CLI
|
||||
* Removes runtime check for node >= 4.6
|
||||
|
||||
### 2.5.1
|
||||
[Full Changelog](https://github.com/ParsePlatform/parse-server/compare/2.5.0...2.5.1)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parse-server",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"description": "An express module providing a Parse-compatible API server",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
||||
@@ -146,10 +146,6 @@ class ParseServer {
|
||||
objectIdSize = defaults.objectIdSize,
|
||||
__indexBuildCompletionCallbackForTests = () => {},
|
||||
}) {
|
||||
// verify parse-server is running on node >= 4.6
|
||||
if (process.versions.node < '4.6') {
|
||||
throw 'You must run parse-server on node >= 4.6. Your current node version is ' + process.versions.node + '.';
|
||||
}
|
||||
|
||||
// Initialize the node client SDK automatically
|
||||
Parse.initialize(appId, javascriptKey || 'unused', masterKey);
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
nullParser
|
||||
} from '../utils/parsers';
|
||||
|
||||
|
||||
export default {
|
||||
"appId": {
|
||||
env: "PARSE_SERVER_APPLICATION_ID",
|
||||
@@ -225,6 +224,16 @@ export default {
|
||||
help: "Use a single schema cache shared across requests. Reduces number of queries made to _SCHEMA. Defaults to false, i.e. unique schema cache per request.",
|
||||
action: booleanParser
|
||||
},
|
||||
"cacheTTL": {
|
||||
env: "PARSE_SERVER_CACHE_TTL",
|
||||
help: "Sets the TTL for the in memory cache (in ms), defaults to 5000 (5 seconds)",
|
||||
action: numberParser,
|
||||
},
|
||||
"cacheMaxSize": {
|
||||
env: "PARSE_SERVER_CACHE_MAX_SIZE",
|
||||
help: "Sets the maximum size for the in memory cache, defaults to 10000",
|
||||
action: numberParser
|
||||
},
|
||||
"cluster": {
|
||||
env: "PARSE_SERVER_CLUSTER",
|
||||
help: "Run with cluster, optionally set the number of processes default to os.cpus().length",
|
||||
|
||||
@@ -155,7 +155,7 @@ function enforceRoleSecurity(method, className, auth) {
|
||||
}
|
||||
|
||||
//all volatileClasses are masterKey only
|
||||
if(classesWithMasterOnlyAccess.includes(className) && !auth.isMaster){
|
||||
if(classesWithMasterOnlyAccess.indexOf(className) >= 0 && !auth.isMaster){
|
||||
const error = `Clients aren't allowed to perform the ${method} operation on the ${className} collection.`
|
||||
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user