feat(abm): abm completo de ciclos lectivos, aulas y reservas con proteccion de integridad y pruebas automatizadas

This commit is contained in:
2026-09-23 20:35:54 -03:00
parent a188c3bd8f
commit ddd1714eb2
15 changed files with 477 additions and 19 deletions
+11 -8
View File
@@ -20,14 +20,17 @@ def jwt_required(f):
token = request.cookies.get('access_token')
if not token:
from flask_login import current_user
if current_user.is_authenticated and current_user.is_active:
g.jwt_user = current_user
g.jwt_payload = {'sub': str(current_user.id), 'role': getattr(current_user, 'role', '')}
g.jwt_token = None
g.real_admin_user = current_user
g.is_impersonating = False
return f(*args, **kwargs)
try:
from flask_login import current_user
if current_user.is_authenticated and current_user.is_active:
g.jwt_user = current_user
g.jwt_payload = {'sub': str(current_user.id), 'role': getattr(current_user, 'role', '')}
g.jwt_token = None
g.real_admin_user = current_user
g.is_impersonating = False
return f(*args, **kwargs)
except Exception:
pass
return jsonify({
'error': 'Unauthorized',