From 06b4ecbbcffd3d75c9af1444deeecdb798f82bad Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 23 Oct 2025 11:47:29 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Bug=20Fix:=20One-off=20button=20is=20missin?= =?UTF-8?q?g=20for=20users=20with=20only=20=E2=80=98send=20message?= =?UTF-8?q?=E2=80=99=20permission.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main/views/send.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index af9eb7df6..e2d9f28f5 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -846,9 +846,7 @@ def get_skip_link(step_index, template): and step_index == 0 and template.template_type in ("sms", "email") and not (template.template_type == "sms" and current_user.mobile_number is None) - and current_user.has_permissions( - ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SERVICE - ) + and current_user.has_permissions(ServicePermission.SEND_MESSAGES) ): return ( "Use my {}".format(first_column_headings[template.template_type][0]), From 5fa80741207ecef510621ddbb2d05b6ed9eb278c Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 23 Oct 2025 11:50:24 -0700 Subject: [PATCH 2/2] add test for send-one-off --- tests/app/main/views/test_send.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index e3577e73c..4c93ce745 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -1310,7 +1310,12 @@ def test_send_one_off_shows_placeholders_in_correct_order( "Use my email address", partial(url_for, "main.send_one_off_to_myself"), ), - (create_active_caseworking_user(), "sms", None, None), + ( + create_active_caseworking_user(), + "sms", + "Use my phone number", + partial(url_for, "main.send_one_off_to_myself"), + ), ], ) def test_send_one_off_has_skip_link(