Title: 🎉 Improved Code Organization and Enhanced Documentation in models.py

This commit is contained in:
2025-06-19 06:27:11 +02:00
parent 59fafc66e4
commit 94eba76dcb
206 changed files with 847 additions and 6 deletions

View File

@ -80,10 +80,15 @@ def admin_required(f):
admin_logger.warning(
f"Admin-Zugriff verweigert für User {user_id} auf Funktion {f.__name__}"
)
return jsonify({
"error": "Nur Administratoren haben Zugriff",
"message": "Admin-Berechtigung erforderlich"
}), 403
# Unterscheidung zwischen UI- und API-Routen
if request.path.startswith('/api/'):
return jsonify({
"error": "Nur Administratoren haben Zugriff",
"message": "Admin-Berechtigung erforderlich"
}), 403
else:
flash("Nur Administratoren haben Zugriff auf diesen Bereich", "error")
return redirect(url_for('dashboard'))
return f(*args, **kwargs)
return decorated_function

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More