feat(writeapi): token generation/delete routes, ACP updates

This commit is contained in:
Julian Lam
2020-10-07 14:28:58 -04:00
parent 2928b9b87a
commit 2ec838fc59
7 changed files with 74 additions and 51 deletions

View File

@@ -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();
};
};