feat(multi-tenant): configurar las 3 empresas oficiales (Telcotronics, XSYSTEM, DOMUS) y selector rapido de entorno
This commit is contained in:
@@ -25,6 +25,9 @@ module.exports = {
|
||||
if (req.session.user && req.session.user.company_id) {
|
||||
const company = await Company.findById(req.session.user.company_id);
|
||||
res.locals.company = company;
|
||||
if (req.session.user.rol === 'superadmin') {
|
||||
res.locals.allCompanies = await Company.findAll();
|
||||
}
|
||||
}
|
||||
next();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user