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

Function cm_info::is_user_access_restricted_by_capability() assumes current user

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.5, 2.5.1
    • 2.4.6, 2.5.2
    • Course
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • wip-MDL-41179-master
    • Hide

      This is testing possible regressions only, since in core we never call get_fast_modinfo for non-current user

      1. Create a course with activity it in
      2. Revoke from student capability to view this activity type
      3. Login as student and make sure he not see the activity any more
      4. Login as teacher and make sure he can see the activity
      5. Being logged in as teacher/manager, "login as" student and make sure you can't see the activity
      6. Restore the capability
      7. Make sure student can see it
      Show
      This is testing possible regressions only, since in core we never call get_fast_modinfo for non-current user Create a course with activity it in Revoke from student capability to view this activity type Login as student and make sure he not see the activity any more Login as teacher and make sure he can see the activity Being logged in as teacher/manager, "login as" student and make sure you can't see the activity Restore the capability Make sure student can see it
    • BACKEND Sprint 4

    Description

      Function cm_info::is_user_access_restricted_by_capability() assumes current user instead of user specified when get_fast_modinfo() was called.

      At the same time we never call get_fast_modinfo() for non-current user in core but we should not exclude probability

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              Dan Poltawski Dan Poltawski
              Rossiani Wijaya Rossiani Wijaya
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Sep/13