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

Incorrect restrictions in helper delete/export when called from mod

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.3.6, 3.4.3
    • 3.3.3, 3.4.2, 3.5
    • Privacy

      A mod can export for non-mod contexts, but the helper does not cope with this.

      Bad combination of checking component name for mod, and a strict type hint of context_module on the functions they call.

      If I try to delete user contexts I get the same error I reported Yesterday 
       
      Error code: generalexceptionmessage
      * line 275 of /privacy/classes/local/request/helper.php: TypeError thrown
      * line 95 of /privacy/classes/local/request/helper.php: call to core_privacy\local\request\helper::delete_data_for_all_users_in_context_course_module()
      * line 267 of /privacy/classes/manager.php: call to core_privacy\local\request\helper::delete_data_for_all_users_in_context()
      * line 90 of /admin/tool/dataprivacy/classes/expired_contexts.php: call to core_privacy\manager->delete_data_for_all_users_in_context()
      * line 61 of /admin/tool/dataprivacy/classes/task/expired_retention_period.php: call to tool_dataprivacy\expired_contexts->delete()
      * line 156 of /admin/tool/task/cli/schedule_task.php: call to tool_dataprivacy\task\expired_retention_period->execute()
       
      !!! Exception - Argument 2 passed to core_privacy\local\request\helper::delete_data_for_all_users_in_context_course_module() must be an instance of context_module, instance of context_user given, called in [dirroot]/privacy/classes/local/request/helper.php on line 95 !!!
      

      dmonllao will hopefully be able to advise which plugin this breaks on for replication instructions.

            dmonllao David Monllaó
            dobedobedoh Andrew Lyons
            Jun Pataleta Jun Pataleta
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m

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