mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 14:16:25 +02:00
feat(writeapi): token generation/delete routes, ACP updates
This commit is contained in:
@@ -40,8 +40,8 @@ module.exports = function (middleware) {
|
||||
};
|
||||
|
||||
middleware.exposePrivilegeSet = async (req, res, next) => {
|
||||
// Exposes a user's global privilege set
|
||||
res.locals.privileges = await privileges.global.get(req.user.uid);
|
||||
// Exposes a user's global/admin privilege set
|
||||
res.locals.privileges = { ...await privileges.global.get(req.user.uid), ...await privileges.admin.get(req.user.uid) };
|
||||
return next();
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user