small fix check in hasperms

merge-requests/208/head
fatchan 5 years ago
parent 0476be62bf
commit 13657a04cb
  1. 2
      helpers/checks/hasperms.js

@ -1,6 +1,7 @@
'use strict'; 'use strict';
module.exports = (req, res) => { module.exports = (req, res) => {
if (req.session) {
const { authenticated, user } = req.session; const { authenticated, user } = req.session;
if (authenticated === true && user != null) { if (authenticated === true && user != null) {
if (user.authLevel < 4) { //assigned levels if (user.authLevel < 4) { //assigned levels
@ -14,5 +15,6 @@ module.exports = (req, res) => {
} }
} }
} }
}
return 4; //not logged in, not staff or moderator return 4; //not logged in, not staff or moderator
} }

Loading…
Cancel
Save