From 724586619a27a3d8b17debf2e20cc9da54f07aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ho=CC=88=C3=9Fl?= Date: Fri, 4 Oct 2024 10:59:04 +0200 Subject: [PATCH] Bugfix: withdrawn motions were amendable --- History.md | 1 + models/settings/Permissions.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/History.md b/History.md index 81118e629..e84ba9cfb 100644 --- a/History.md +++ b/History.md @@ -8,6 +8,7 @@ - Custom input fields in motion forms can now have explanations. They can also be set to be "encouraged but not required" - that is, the user can skip them but will get a warning if they do so. - Bugfix: Tabular data was not encoded correctly in the PHP-based PDF export. - Bugfix: The PDF with all amendments embedded into the motion text could not be generated if a Weasyprint-based PDF layout was selected. +- Bugfix: It was possible for users to submit amendments for withdrawn motions. ### Version 4.14.2 (2024-09-08) diff --git a/models/settings/Permissions.php b/models/settings/Permissions.php index e34731690..e2df40715 100644 --- a/models/settings/Permissions.php +++ b/models/settings/Permissions.php @@ -192,6 +192,8 @@ public function isCurrentlyAmendable(Motion $motion, bool $allowAdmins = true, b } } $notAmendableStatuses = [ + Motion::STATUS_WITHDRAWN, + Motion::STATUS_WITHDRAWN_INVISIBLE, Motion::STATUS_DELETED, Motion::STATUS_DRAFT, Motion::STATUS_COLLECTING_SUPPORTERS,