"use strict"; const errors = require("../errors"); module.exports = { isAuthenticated: function (req, res, next) { if (req.session.user != null) { next(); } else { throw new errors.UnauthorizedError("You must be authenticated to view this page"); } }, isAdministrator: function (req, res, next) { /* FIXME */ next(); } };