05/06 Modify Director's can NOT change user role, Inspector can view own reports
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user