Added access rights feature + read access check

This commit is contained in:
NGPixel committed 2016-10-31 22:44:00 -04:00
1 parent 09b4d37f4c
commit a05560e9fc
9 files changed
+122 -17

No files matched your search

+6
View File
@@ -19,6 +19,12 @@ module.exports = (req, res, next) => {
return res.redirect('/login');
}
// Check permissions
if(!rights.check(req, 'read')) {
return res.render('error-forbidden');
}
// Set i18n locale
req.i18n.changeLanguage(req.user.lang);