diff --git a/calendario.html b/calendario.html
index f1fc9fa..04bdecd 100644
--- a/calendario.html
+++ b/calendario.html
@@ -281,7 +281,8 @@
}
document.addEventListener("DOMContentLoaded", async () => {
- if (!localStorage.getItem("token") || localStorage.getItem("role") !== 'operario') {
+ const currentRole = localStorage.getItem("role");
+ if (!localStorage.getItem("token") || (currentRole !== 'operario' && currentRole !== 'operario_cerrado')) {
window.location.href = "index.html"; return;
}
await applyTheme();