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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              jaked Jake Dallimore
              Amaia Anabitarte Amaia Anabitarte
              Víctor Déniz Falcón Víctor Déniz Falcón
              CiBoT CiBoT
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

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