fix(optimizer): allow bedelia and operators access to ai room reservation optimizer v3.4.5
This commit is contained in:
+13
-7
@@ -85,9 +85,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
|
||||
});
|
||||
|
||||
// Versiones institucionales del sistema
|
||||
const APP_VERSION = '3.4.4';
|
||||
const FRONTEND_VERSION = '3.4.4';
|
||||
const BACKEND_VERSION = '3.4.4';
|
||||
const APP_VERSION = '3.4.5';
|
||||
const FRONTEND_VERSION = '3.4.5';
|
||||
const BACKEND_VERSION = '3.4.5';
|
||||
|
||||
env.addGlobal('app_version', APP_VERSION);
|
||||
env.addGlobal('frontend_version', FRONTEND_VERSION);
|
||||
@@ -352,16 +352,22 @@ app.get(['/main/dashboard', '/main'], (req, res) => {
|
||||
res.redirect('/dashboard' + query);
|
||||
});
|
||||
|
||||
const { requireAuth } = require('./middlewares/authMiddleware');
|
||||
|
||||
// Módulo Predictivo y Optimizador
|
||||
app.get('/predictive', (req, res) => {
|
||||
app.get('/predictive', requireAuth, (req, res) => {
|
||||
res.render('predictive/index', {
|
||||
title: 'Dashboard Predictivo - Edu-Space Admin'
|
||||
title: 'Dashboard Predictivo - Edu-Space Admin',
|
||||
user: req.user,
|
||||
user_role: (req.user?.role || 'admin').toLowerCase()
|
||||
});
|
||||
});
|
||||
|
||||
app.get(['/genetic_optimizer', '/genetic_algorithm_web/genetic_optimizer'], (req, res) => {
|
||||
app.get(['/genetic_optimizer', '/genetic_algorithm_web/genetic_optimizer'], requireAuth, (req, res) => {
|
||||
res.render('genetic_optimizer', {
|
||||
title: 'Optimizador de Aulas (IA) - Edu-Space Admin'
|
||||
title: 'Optimizador de Aulas (IA) - Edu-Space Admin',
|
||||
user: req.user,
|
||||
user_role: (req.user?.role || 'admin').toLowerCase()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user