Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-84121

Interface error when trying to send a message by a user with a role that is not allowed to do so.

    • MOODLE_402_STABLE
    • 2
    • Team Hedgehogs 2025 Sprint 2.1, Team Hedgehogs 2025 Sprint 2.2

      On our site, users with the ‘student’ role are not allowed to write messages in the private messaging system. To implement this prohibition, we removed all permissions for the roles ‘student’ and ‘authenticated user’ regarding ‘message’:

      Technically, we got the expected result: users without the role ‘teacher’ or ‘administrator’ cannot initiate a dialogue or send a message in a dialogue started by another user. This is exactly what we need - teachers and administrators can correspond and make newsletters, but students cannot.
      However, the button to send messages from the student interface has not disappeared, and if he tries to reply to someone who has written to him, an error ‘error/User N cannot send a message to conversation M’ occurs when he presses it. 

      Are there no prettier ways to achieve what we need?

        1. image-2025-01-08-21-16-35-699.png
          99 kB
          Евгений Дорофеев
        2. image-2025-01-08-21-17-44-219.png
          14 kB
          Евгений Дорофеев

            yusuf.wibisono@moodle.com Yusuf Wibisono
            евгенийдорофеев Евгений Дорофеев
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 41 minutes
                5h 41m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.