Merge pull request #1235 from drew-gross/config-out-of-experimental

Tested with the dashboard, it now works great.
This commit is contained in:
Florent Vilmart
2016-03-28 21:58:11 -04:00
2 changed files with 5 additions and 10 deletions

View File

@@ -228,12 +228,9 @@ class ParseServer {
new LogsRouter(),
new IAPValidationRouter(),
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) {
routers.push(new HooksRouter());
}

View File

@@ -2,17 +2,15 @@ import { version } from '../../package.json';
import PromiseRouter from '../PromiseRouter';
import * as middleware from "../middlewares";
const isGlobalConfigEnabled = !!(process.env.PARSE_EXPERIMENTAL_CONFIG_ENABLED || process.env.TESTING)
export class FeaturesRouter extends PromiseRouter {
mountRoutes() {
this.route('GET','/serverInfo', middleware.promiseEnforceMasterKeyAccess, req => {
const features = {
globalConfig: {
create: isGlobalConfigEnabled,
read: isGlobalConfigEnabled,
update: isGlobalConfigEnabled,
delete: isGlobalConfigEnabled,
create: true,
read: true,
update: true,
delete: true,
},
hooks: {
create: false,