Jul 16 - Fill the gaps between Single-tenant mode and Multi-tenant mode

This commit is contained in:
2026-07-16 16:37:49 -04:00
parent 99d966e6ad
commit 8ff38578ad
23 changed files with 125 additions and 44 deletions
+3 -2
View File
@@ -29,6 +29,7 @@ def index():
is_privileged = current_user.role in ['admin', 'director']
is_customer = current_user.role == 'customer'
is_project_manager = current_user.role == 'project_manager'
is_auditor = current_user.role == 'auditor'
# Resolve facility scope
customer_facility_ids = get_customer_scope(current_user) # None for non-customers
@@ -299,9 +300,9 @@ def index():
unassigned_q = unassigned_q.filter(False) # not relevant for customers
unassigned_open = unassigned_q.count()
# ── Inspector activity today (admin / director / PM only) ─────────────────
# ── Inspector activity today (admin / director / PM / auditor only) ───────
inspector_activity = []
if is_privileged or is_project_manager:
if is_privileged or is_project_manager or is_auditor:
active_inspectors = (
User.query
.filter_by(role='inspector', active=True)