"Refactor database schema for improved performance: feat(database) - WAL integration and template updates"

This commit is contained in:
Till Tomczak 2025-05-29 19:27:43 +02:00
parent efbb54c1e2
commit f4fbf92055
4 changed files with 19 additions and 2 deletions

Binary file not shown.

View File

@ -291,6 +291,7 @@ class User(UserMixin, Base):
last_login = Column(DateTime, nullable=True) # Letzter Login-Zeitstempel
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) # Automatische Aktualisierung
settings = Column(Text, nullable=True) # JSON-String für Benutzereinstellungen
last_activity = Column(DateTime, default=datetime.now)
# Zusätzliche Profil-Felder für bessere Benutzerverwaltung
department = Column(String(100), nullable=True) # Abteilung

View File

@ -857,7 +857,7 @@ document.addEventListener('DOMContentLoaded', function() {
const fields = [
{ id: 'name', type: 'text', minLength: 2, required: true },
{ id: 'email', type: 'email', required: true },
{ id: 'printer_id', type: 'select', required: true },
{ id: 'printer_id', type: 'select', required: false },
{ id: 'duration_min', type: 'number', min: 1, max: 9999, required: true },
{ id: 'reason', type: 'textarea', minLength: 50, required: true }
];

View File

@ -532,7 +532,7 @@
}
// Show warning at 3 attempts
if (loginAttempts >= 3 && loginAttempts < MAX_ATTEMPTS) {
if (loginAttempts >= 5 && loginAttempts < MAX_ATTEMPTS) {
document.getElementById('rate-limit-warning').classList.remove('hidden');
}
}
@ -1038,5 +1038,21 @@
});
});
}
// === DEBUGGING FUNKTIONEN ===
// Diese Funktionen können nach dem erfolgreichen Login entfernt werden
function enableRateLimiting() {
console.log("Rate Limiting wieder aktiviert");
// Entfernen Sie die "return;" Zeile aus checkRateLimit() um es zu reaktivieren
}
function clearLoginAttempts() {
localStorage.removeItem('loginAttempts');
localStorage.removeItem('lastAttemptTime');
console.log("Login-Versuche zurückgesetzt");
}
// === ENDE DEBUGGING FUNKTIONEN ===
</script>
{% endblock %}