Disable various server/operator routes based on edition

The initial idea was to put an owner flag but this means that the
owner will be visible inside apps.
This commit is contained in:
Girish Ramakrishnan
2018-09-05 13:18:06 -07:00
parent 0439bd8869
commit 3d004b3dcc
3 changed files with 28 additions and 12 deletions

View File

@@ -38,8 +38,11 @@ exports = module.exports = {
dkimSelector: dkimSelector,
isDemo: isDemo,
// feature flags based on editions (these have a separate license from standard edition)
isSpacesEnabled: isSpacesEnabled,
allowHyphenatedSubdomains: allowHyphenatedSubdomains,
allowOperatorActions: allowOperatorActions,
// for testing resets to defaults
_reset: _reset
@@ -233,6 +236,10 @@ function allowHyphenatedSubdomains() {
return get('edition') === 'hostingprovider';
}
function allowOperatorActions() {
return get('edition') !== 'hostingprovider';
}
function provider() {
return get('provider');
}