🐛 Refactor: Consolidated user management and security functions in the backend. Added legal pages blueprint for compliance. Removed legacy rate limiter functions to streamline security integration. Updated logging for better clarity. 📚
This commit is contained in:
59
backend/blueprints/legal_pages.py
Normal file
59
backend/blueprints/legal_pages.py
Normal file
@@ -0,0 +1,59 @@
|
||||
"""
|
||||
Rechtliche Seiten für das MYP-System
|
||||
Impressum, Datenschutz, Nutzungsbedingungen, etc.
|
||||
"""
|
||||
|
||||
from flask import Blueprint, render_template, current_app
|
||||
from flask_login import current_user
|
||||
|
||||
legal_bp = Blueprint('legal', __name__)
|
||||
|
||||
@legal_bp.route('/impressum')
|
||||
def imprint():
|
||||
"""Impressum/Rechtliche Hinweise"""
|
||||
return render_template('imprint.html',
|
||||
title='Impressum - MYP Platform')
|
||||
|
||||
@legal_bp.route('/datenschutz')
|
||||
def privacy():
|
||||
"""Datenschutzerklärung"""
|
||||
return render_template('privacy.html',
|
||||
title='Datenschutz - MYP Platform')
|
||||
|
||||
@legal_bp.route('/nutzungsbedingungen')
|
||||
def terms():
|
||||
"""Nutzungsbedingungen"""
|
||||
return render_template('terms.html',
|
||||
title='Nutzungsbedingungen - MYP Platform')
|
||||
|
||||
@legal_bp.route('/rechtliches')
|
||||
def legal():
|
||||
"""Allgemeine rechtliche Informationen"""
|
||||
return render_template('legal.html',
|
||||
title='Rechtliche Hinweise - MYP Platform')
|
||||
|
||||
@legal_bp.route('/system-info')
|
||||
def system_info():
|
||||
"""System-Informationen und Version"""
|
||||
system_data = {
|
||||
'version': '3.0.0',
|
||||
'environment': current_app.config.get('ENV', 'production'),
|
||||
'python_version': current_app.config.get('PYTHON_VERSION', 'Unknown'),
|
||||
'flask_version': current_app.config.get('FLASK_VERSION', 'Unknown'),
|
||||
'features': [
|
||||
'3D-Drucker Management',
|
||||
'Smart Plug Integration (TP-Link Tapo)',
|
||||
'Benutzer- und Rechteverwaltung',
|
||||
'Gast-Zugang mit OTP',
|
||||
'Energie-Monitoring',
|
||||
'Kalender-Integration',
|
||||
'Job-Queue Management',
|
||||
'Automatische Backups',
|
||||
'Progressive Web App (PWA)',
|
||||
'Dark/Light Mode'
|
||||
]
|
||||
}
|
||||
|
||||
return render_template('system_info.html',
|
||||
title='System-Information - MYP Platform',
|
||||
system=system_data)
|
Reference in New Issue
Block a user