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

Wrong context level for capability moodle/course:viewsuspendedusers

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Make sure core upgrade script ran for you, for ease of rebasing the version bump was not included in this branch

      1. Create a course
      2. Enrol a user as a student and suspend them
      3. Enrol another user as a teacher
      4. Login as a teacher and go to course participants
      5. You should see the suspended student
      6. Login as an admin, go to the course, from the edit menu select "More...", then "Users" and then "Permissions" (the section name link)
      7. Search for moodle/course:viewsuspendedusers and remove it from "Teacher" role (Before this patch it was not possible)
      8. Login as a teacher
      9. Make sure you can not see suspended users in the participants list
      Show
      Make sure core upgrade script ran for you, for ease of rebasing the version bump was not included in this branch Create a course Enrol a user as a student and suspend them Enrol another user as a teacher Login as a teacher and go to course participants You should see the suspended student Login as an admin, go to the course, from the edit menu select "More...", then "Users" and then "Permissions" (the section name link) Search for moodle/course:viewsuspendedusers and remove it from "Teacher" role (Before this patch it was not possible) Login as a teacher Make sure you can not see suspended users in the participants list
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-67073-master

      Description

      capability moodle/course:viewsuspendedusers has context_system when it is something that can be granted in the course

      This capability can still be added to the roles that are assignable in the course context (such as editingteacher), however it can not be overridden because of the wrong definition

        Attachments

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            Daniel Neis Araujo
            Integrator:
            Jun Pataleta
            Tester:
            Gladys Basiana
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jan/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m