From 7d64d0e78ad3ea0e5871ce755262ee89bc775e10 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 31 Aug 2025 13:32:26 -0600 Subject: [PATCH] Guh --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f8fe557..73cbb5d 100644 --- a/index.js +++ b/index.js @@ -44,15 +44,15 @@ global.comparePassword = async function(password, hash) { return await bcrypt.compare(password, hash); }; -global.checkACL = function(req, res, next, perm) { +global.checkACL = function(req,, perm) { if (!req.session.user) { return res.status(401).render('error', { error: 'You must be logged in to access this resource.' }); } const perms = req.session.user.perms ? JSON.parse(req.session.user.perms) : []; if (perms.includes('*') || perms.includes(perm)) { - return next(); + return true; } - return res.status(403).render('error', { error: 'You do not have permission to access this resource.', button: {text: "Go Back", action:"back"} }); + return false; };