Skip to content

Node.js based forum software built for the modern web

show dashboard notice if forum is running in dev mode

psychobunny458cbfd60315
diff --git a/public/language/en-GB/admin/general/dashboard.json b/public/language/en-GB/admin/general/dashboard.json
index a70dda322e..02046bd17a 100644
--- a/public/language/en-GB/admin/general/dashboard.json
+++ b/public/language/en-GB/admin/general/dashboard.json
@@ -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",
diff --git a/src/controllers/admin/dashboard.js b/src/controllers/admin/dashboard.js
index 09c2838d73..2ffbea0e98 100644
--- a/src/controllers/admin/dashboard.js
+++ b/src/controllers/admin/dashboard.js
@@ -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) {