Refactor permission checks for marking cases as normal to use can_edit method

This commit is contained in:
Ross
2026-02-02 10:23:46 +00:00
parent 5e14df4836
commit 16865fab03
2 changed files with 15 additions and 27 deletions
@@ -4,7 +4,7 @@
{% if case.normal_case %}
<span class="badge bg-success">Normal</span>
<small class="text-muted">{{ case.normal_case.display_age }}</small>
{% if can_mark_normal %}
{% if can_edit %}
<button class="btn btn-sm btn-outline-danger ms-2"
hx-post="{% url 'atlas:case_toggle_normal' case.pk %}"
hx-target="#normal-toggle-block"
@@ -14,7 +14,7 @@
</button>
{% endif %}
{% else %}
{% if can_mark_normal %}
{% if can_edit %}
<button class="btn btn-sm btn-outline-primary"
hx-get="{% url 'atlas:case_normal_form' case.pk %}"
hx-target="body"