feat(templates/projects/partials): replace hard-coded status completion check with configurable allowed_move_to_status_ids

Prevents brute-force attacks by only allowing moves to statuses explicitly permitted.
This commit is contained in:
sankalp committed 2026-06-28 19:35:54 +05:45
1 parent ce0c1349ca
commit 4c1ebbf357
1 file changed
+2 -2
@@ -25,8 +25,8 @@
@drop.prevent="
$el.classList.remove('ring-2', 'ring-blue-500');
if (!dragging) return;
{% if not user_can_move_to_completed %}
if ($el.dataset.statusCompleted === 'true') return;
{% if allowed_move_to_status_ids is not None %}
if (![{{ allowed_move_to_status_ids|join:"," }}].includes(parseInt($el.dataset.statusId))) return;
{% endif %}
const tid = dragging;
dragging = null;