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

info::is_available_for_all() doesn't respect the 'enableavailability' config setting properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.0
    • 4.0
    • Restrict access

      This method seems to have been broken in MDL-72578. The offending code is pretty obvious and causes the method to return 'true' in cases where the config setting 'enableavailability' is enabled (the site default). What this means is that when access restrictions are enabled, this method says "Yep, available to all", and this breaks any calling code. It should only be returning true when access restrictions are NOT enabled.

      I found this because the mod/lti member service code uses availability to know which members to return (those having access to a specific module context) - and this is consequently broken, resulting in a return of all members and potential access concerns. There are likely other places too.

            jaked Jake Dallimore
            jaked Jake Dallimore
            Amaia Anabitarte Amaia Anabitarte
            Victor Déniz Falcón Victor Déniz Falcón
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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