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

Not enrolled users can be subscribed to forum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 2.1, 2.2
    • Forum
    • None
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      Testing difficulty: moderate

      1. Login as admin
      2. Write down the IDs of two users (not the admin user)
      3. Enrol one of this user in a course
      4. Create a forum with optional subscription
      5. Visit the following URL (/mod/forum/subscribe.php?id=&sesskey=&user=) making sure you:
        • Update the id variable with your forum id
        • Update the sesskey with yours
        • Set the user variable to the user id of the enrolled user
      6. The following page confirms that the user has been subscribed
      7. Now visit the same URL but change the user id with the one of the user that is not enrolled in the course
      8. An error occurs preventing the user to be subscribed
      Show
      Testing difficulty: moderate Login as admin Write down the IDs of two users (not the admin user) Enrol one of this user in a course Create a forum with optional subscription Visit the following URL (/mod/forum/subscribe.php?id=&sesskey=&user=) making sure you: Update the id variable with your forum id Update the sesskey with yours Set the user variable to the user id of the enrolled user The following page confirms that the user has been subscribed Now visit the same URL but change the user id with the one of the user that is not enrolled in the course An error occurs preventing the user to be subscribed

      When subscribing a user to a forum, the permissions to subscribe to the forum are tested against the current user, not the target one.

      Before fixing, following the test instructions will fail at step 5 because the admin user is not enrolled in the course.

      See mod/forum/subscribe.php:83 and linked issue.

            lucaboesch Luca Bösch
            fred Frédéric Massart
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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