Jul 16 - Fill the gaps between Single-tenant mode and Multi-tenant mode
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user