From 4a78348fc2007f1c92c74c36fc7ccdb95a9544f3 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Wed, 24 Dec 2025 12:20:49 -0500 Subject: [PATCH] Modification: add Accounting role to edit record --- app.py | 2 +- templates/attendance_report.html | 9 ++++---- templates/edit_attendance.html | 39 ++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 2054867..6844eef 100644 --- a/app.py +++ b/app.py @@ -5153,7 +5153,7 @@ def edit_attendance(record_id): """Edit attendance record (Admin and Payroll only)""" # Check if user has permission to edit attendance records if session.get('role') not in ['admin', 'payroll', 'accounting']: - flash('Access denied. Only administrators and payroll staff can edit attendance records.', 'error') + flash('Access denied. Only administrators and accounting staff can edit attendance records.', 'error') return redirect(url_for('attendance_report')) try: diff --git a/templates/attendance_report.html b/templates/attendance_report.html index 6d7da26..7ea3bba 100644 --- a/templates/attendance_report.html +++ b/templates/attendance_report.html @@ -347,7 +347,7 @@ {% endif %} - {% if session.role in ['admin'] %} + {% if session.role in ['admin', 'payroll', 'accounting'] %}