Merge pull request #1235 from drew-gross/config-out-of-experimental
Tested with the dashboard, it now works great.
This commit is contained in:
@@ -228,12 +228,9 @@ class ParseServer {
|
|||||||
new LogsRouter(),
|
new LogsRouter(),
|
||||||
new IAPValidationRouter(),
|
new IAPValidationRouter(),
|
||||||
new FeaturesRouter(),
|
new FeaturesRouter(),
|
||||||
|
new GlobalConfigRouter(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (process.env.PARSE_EXPERIMENTAL_CONFIG_ENABLED || process.env.TESTING) {
|
|
||||||
routers.push(new GlobalConfigRouter());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.PARSE_EXPERIMENTAL_HOOKS_ENABLED || process.env.TESTING) {
|
if (process.env.PARSE_EXPERIMENTAL_HOOKS_ENABLED || process.env.TESTING) {
|
||||||
routers.push(new HooksRouter());
|
routers.push(new HooksRouter());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,15 @@ import { version } from '../../package.json';
|
|||||||
import PromiseRouter from '../PromiseRouter';
|
import PromiseRouter from '../PromiseRouter';
|
||||||
import * as middleware from "../middlewares";
|
import * as middleware from "../middlewares";
|
||||||
|
|
||||||
const isGlobalConfigEnabled = !!(process.env.PARSE_EXPERIMENTAL_CONFIG_ENABLED || process.env.TESTING)
|
|
||||||
|
|
||||||
export class FeaturesRouter extends PromiseRouter {
|
export class FeaturesRouter extends PromiseRouter {
|
||||||
mountRoutes() {
|
mountRoutes() {
|
||||||
this.route('GET','/serverInfo', middleware.promiseEnforceMasterKeyAccess, req => {
|
this.route('GET','/serverInfo', middleware.promiseEnforceMasterKeyAccess, req => {
|
||||||
const features = {
|
const features = {
|
||||||
globalConfig: {
|
globalConfig: {
|
||||||
create: isGlobalConfigEnabled,
|
create: true,
|
||||||
read: isGlobalConfigEnabled,
|
read: true,
|
||||||
update: isGlobalConfigEnabled,
|
update: true,
|
||||||
delete: isGlobalConfigEnabled,
|
delete: true,
|
||||||
},
|
},
|
||||||
hooks: {
|
hooks: {
|
||||||
create: false,
|
create: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user