show dashboard notice if forum is running in dev mode

v1.18.x
psychobunny 8 years ago
parent a2847dc851
commit 458cbfd603

@ -21,6 +21,7 @@
"upgrade-available": "<p>A new version (v%1) has been released. Consider <a href=\"https://docs.nodebb.org/en/latest/upgrading/index.html\">upgrading your NodeBB</a>.</p>",
"prerelease-upgrade-available": "<p>This is an outdated pre-release version of NodeBB. A new version (v%1) has been released. Consider <a href=\"https://docs.nodebb.org/en/latest/upgrading/index.html\">upgrading your NodeBB</a>.</p>",
"prerelease-warning": "<p>This is a <strong>pre-release</strong> version of NodeBB. Unintended bugs may occur. <i class=\"fa fa-exclamation-triangle\"></i></p>",
"running-in-development": "<span>Forum is running in development mode. The forum may be open to potential vulnerabilities; please contact your system administrator.</span>",
"notices": "Notices",
"restart-not-required": "Restart not required",

@ -30,6 +30,14 @@ dashboardController.get = function (req, res, next) {
link:'/admin/extend/plugins'
}
];
if (global.env !== 'production') {
notices.push({
done: false,
notDoneText: '[[admin/general/dashboard:running-in-development]]'
});
}
plugins.fireHook('filter:admin.notices', notices, next);
}
}, function (err, results) {

Loading…
Cancel
Save