Allow technicians to record training sessions (#664)

* Allow technicians to record training sessions

Add a per-item technician_can_train flag. Technicians in an item's department
who are passed out on a flagged item may log Training Started/Complete for it.

* Run linter
This commit is contained in:
Joe Banks
2026-10-03 16:10:13 +01:00
committed by GitHub
parent abfc394088
commit 435e6688e1
11 changed files with 191 additions and 8 deletions

View File

@@ -3,3 +3,7 @@ from PyRIGS.decorators import user_passes_test_with_403
def is_supervisor(login_url=None, oembed_view=None):
return user_passes_test_with_403(lambda u: hasattr(u, "is_supervisor") and u.is_supervisor)
def is_supervisor_or_technician(login_url=None, oembed_view=None):
return user_passes_test_with_403(lambda u: u.is_authenticated and u.can_log_training)