From 4ec4594c623e619613a6540c4b446816feb05f34 Mon Sep 17 00:00:00 2001 From: Kevin Shenk Date: Fri, 5 Jan 2024 04:49:33 -0500 Subject: [PATCH] fix: notification.py should ignore permissions on fetching on mobile_no receiver list Similar to fetching the email list in `get_list_of_recipients()`, the `get_info_based_on_role` call to fetch `mobile_no` in `get_receiver_list()` should set `ignore_permissions` in order to allow sms notifications to send based on actions of limited and anonymous users (e.g. web form submissions). --- frappe/email/doctype/notification/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py index 6b3fe209df..4d86528e40 100644 --- a/frappe/email/doctype/notification/notification.py +++ b/frappe/email/doctype/notification/notification.py @@ -366,7 +366,7 @@ def get_context(context): # For sending messages to specified role if recipient.receiver_by_role: - receiver_list += get_info_based_on_role(recipient.receiver_by_role, "mobile_no") + receiver_list += get_info_based_on_role(recipient.receiver_by_role, "mobile_no", ignore_permissions=True) return receiver_list