05/06 Modify Director's can NOT change user role, Inspector can view own reports

This commit is contained in:
2026-05-06 12:01:04 -04:00
parent 02b3e1c45d
commit 7d7b4aafa8
3 changed files with 317 additions and 452 deletions
+8
View File
@@ -103,7 +103,15 @@
<div class="mb-4">
{{ form.role.label(class="form-label") }}
{% if director_editing %}
{# Directors can see the current role but cannot change it #}
<div class="form-control bg-light text-muted" style="cursor: not-allowed;">
{{ (user.role if user else 'Inspector').replace('_', ' ')|title }}
</div>
<div class="form-text">Role assignment requires Administrator access.</div>
{% else %}
{{ form.role(class="form-select") }}
{% endif %}
</div>
<div class="d-flex gap-2">