Problems when replying messages because of the absence of a permission
Description
Attachments
- 30 Sep 2016, 09:23 AM
- 19 Sep 2016, 07:54 AM
is related to
Activity
Daniel Merino February 7, 2020 at 3:46 AM
@Jesus Maria Mendez Perez @Juanjo Meroño I think that I have found the causes of the bug.
It is not a regression. The issue was not fixed by your patch, only was partially reduced.
When a message is replied, your patch adds the sender of the original message to the recipients list. However, it must be present in totalComposeList in order to be added. This list is filled with everyone who the user which is answering can send to, based on their role's permissions.
If the sender is not in totalComposeList (because the answerer has not permission to send him a message) it can't be added to the recipients list and the issue happens again.
To test this, just remove all permissions from student role, login as an student and try to answer to a message received by him. The bug happens again.
AFAIK this is very hard to fix, because the recipients list is generated with dynamic uuids of allowed users and you can't just add one more recipient to a message if the uuid is not in the list.
And anyway I'm not sure if a user that is not allowed to send a message to nobody should be even allowed to reply.
Daniel Merino February 4, 2020 at 3:19 AMEdited
@Jesus Maria Mendez Perez no, that patch is not applied in our environment.
Also, I tested it in the 12.x QA server and it failed too. So if it is a regression it must be in a 12.x merged patch.
If I find anything I'll let you know.

Jesus Maria Mendez Perez February 4, 2020 at 2:58 AM
Hi @Daniel Merino.
Is possible that this change is affecting?
Is https://sakaiproject.atlassian.net/browse/SAK-42557#icft=SAK-42557 in your 12.6?
Daniel Merino January 29, 2020 at 7:44 AM
@Jesus Maria Mendez Perez @Juanjo Meroño
We have been affected by this issue in 12.6.
I have tested it in 12.x QA server ( https://qa12-mysql.nightly.sakaiproject.org/portal ) and the test plan fails.
I'm still taking a look on it, but FYI.
Neal Caidin September 30, 2016 at 9:26 AM
I was able to reproduce the problem on the 11.x qa server , but not on master, where the fix has been applied.
When trying to reply a message, if you don't have the "msg.permissions.allowToField.users" permission enabled, you will see the following error:
"Alert: Please select a recipient for this reply message."
This alert message is shown in spite of the default recipient is already selected because we are making a reply. See the attached screenshot.