Fiy for a wrong endpoint
This commit is contained in:
+15
-15
@@ -1984,7 +1984,7 @@ def _upload_student_cards_excel():
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_user', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
@@ -3653,7 +3653,7 @@ def api_library_item_update(item_id):
|
||||
|
||||
if not current_permissions['actions'].get('can_edit', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('library'):
|
||||
return jsonify({'ok': False, 'message': 'Bibliotheks-Modul ist deaktiviert.'}), 403
|
||||
|
||||
@@ -3886,7 +3886,7 @@ def student_cards_admin():
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_users', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
@@ -4031,7 +4031,7 @@ def student_cards_print():
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_users', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
@@ -4065,7 +4065,7 @@ def student_card_barcode_print():
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_users', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
@@ -4098,7 +4098,7 @@ def student_card_barcode_download():
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_users', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
@@ -4282,7 +4282,7 @@ def student_card_single_barcode_download(card_id):
|
||||
|
||||
if not current_permissions['actions'].get('can_manage_users', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('student_cards'):
|
||||
flash('Schülerausweis-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
@@ -6366,7 +6366,7 @@ def delete_item(id):
|
||||
|
||||
if not cfg.MODULES.is_enabled('inventory'):
|
||||
flash('Bibliotheks-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
# Resolve all related item ids (grouped variants) and load their data
|
||||
group_item_ids = it.get_group_item_ids(id)
|
||||
@@ -6504,7 +6504,7 @@ def bulk_delete_items():
|
||||
|
||||
if not cfg.MODULES.is_enabled('inventory'):
|
||||
flash('Bibliotheks-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
payload = request.get_json(silent=True) or {}
|
||||
item_ids = payload.get('item_ids') or request.form.getlist('item_ids')
|
||||
@@ -6569,7 +6569,7 @@ def edit_item(id):
|
||||
|
||||
if not cfg.MODULES.is_enabled('inventory'):
|
||||
flash('Bibliotheks-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
# Strip whitespace from all text fields
|
||||
name = sanitize_form_value(request.form.get('name'))
|
||||
@@ -6699,7 +6699,7 @@ def update_group():
|
||||
|
||||
if not current_permissions['actions'].get('can_edit', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion (Löschen) auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
data = request.get_json()
|
||||
series_group_id = data.get('series_group_id')
|
||||
@@ -7050,7 +7050,7 @@ def ausleihen(id):
|
||||
app.logger.debug(f"Borrowing on behalf of student card {student_card_id}: found user {student_user}")
|
||||
if not student_user:
|
||||
flash('Keine Schülerin/kein Schüler mit dieser Ausweis-ID gefunden.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
effective_borrower = student_user.get('Username') or student_user.get('username') or username
|
||||
if borrow_duration_days is None:
|
||||
try:
|
||||
@@ -9087,7 +9087,7 @@ def library_item_invoices(item_id):
|
||||
|
||||
if not current_permissions['pages'].get('library_loans_admin', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
client = None
|
||||
try:
|
||||
@@ -9994,7 +9994,7 @@ def fetch_book_info(isbn):
|
||||
|
||||
if not current_permissions['actions'].get('can_insert', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
|
||||
if not cfg.MODULES.is_enabled('library'):
|
||||
return jsonify({"error": "Bibliotheks-Modul ist deaktiviert."}), 403
|
||||
@@ -10045,7 +10045,7 @@ def download_book_cover():
|
||||
|
||||
if not current_permissions['actions'].get('can_insert', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library'))
|
||||
return redirect(url_for('library_view'))
|
||||
if not cfg.MODULES.is_enabled('library'):
|
||||
return jsonify({"error": "Bibliotheks-Modul ist deaktiviert."}), 403
|
||||
|
||||
|
||||
Reference in New Issue
Block a user