Add config.isDemo()

This commit is contained in:
Girish Ramakrishnan
2016-08-31 20:51:36 -07:00
parent e25ad601c7
commit d3d7f2c320

View File

@@ -33,6 +33,7 @@ exports = module.exports = {
zoneName: zoneName,
isDev: isDev,
isDemo: isDemo,
// for testing resets to defaults
_reset: _reset
@@ -209,6 +210,10 @@ function isDev() {
return /dev/i.test(get('boxVersionsUrl'));
}
function isDemo() {
return get('isDemo') === true;
}
function provider() {
// FIXME this fallback is only there because old Cloudrons do not have the provider set till the next upgrade
return get('provider') || 'caas';