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

Hidden sections and content are visible to users when switching role

XMLWordPrintable

    • 2
    • HQ 2023 Sprint i1.2 Moppies

      If a topic is hidden and a user (teacher) 'switches role to student', then they can still see the topic greyed out in the course index (not expected behaviour).
       

       
      Clicking on the topic 'Database testing' the following error is displayed.

      Which would be expected as the student user should not be able to view or access that content. Clicking on the database activity a similar error is displayed.
       
      When doing the same as a site admin, the topic and content is sdisplayed in the course listing as above. But when accessing the content it is displayed without any errors. 
       
      It appears that moodle 4 is not respecting the switched role but is still applying the permissions from the original user role.

            laurent.david@moodle.com Laurent David
            james.pearce James Pearce
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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