fix: restaurar acceso a Optimizador de Aulas (IA) en Accesos Rapidos y menu de cronograma

This commit is contained in:
Carlos Tello
2026-09-03 03:17:15 -03:00
parent 9521b86399
commit 0c867e0031
4 changed files with 14 additions and 3 deletions
+2 -2
View File
@@ -113,8 +113,8 @@ def dashboard_stats_api():
@login_required
def genetic_optimizer():
"""Serve the genetic algorithm optimization interface"""
if current_user.role not in ['ADMIN']:
flash('You do not have permission to access the optimization tool.', 'danger')
if not (current_user.has_permission('optimizer', 'read') or (current_user.role and current_user.role.upper() == 'ADMIN')):
flash(_('No tienes permisos para acceder a la herramienta de optimización.'), 'danger')
return redirect(url_for('main.dashboard'))
return render_template('genetic_optimizer.html')