0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/initializers/ghost-config.js
Hannah Wolfe bb490e4bbd Hide settings/apps unless apps:true is in config.js
fixes #3031

- Adds an initializer for passing config to the frontend, it's not pretty but it works
- Forwards the apps route and hides the apps menu item if apps:true is not present in config.js
2014-06-23 20:27:51 +01:00

12 lines
370 B
JavaScript

var ConfigInitializer = {
name: 'config',
initialize: function (container, application) {
application.register('ghost:config', application.get('config'), {instantiate: false});
application.inject('route', 'config', 'ghost:config');
application.inject('controller', 'config', 'ghost:config');
}
};
export default ConfigInitializer;