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

Function cm_info::is_user_access_restricted_by_capability() assumes current user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5, 2.5.1
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-41179-master
    • Sprint:
      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

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Integrator:
              Dan Poltawski
              Tester:
              Rossiani Wijaya
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Sep/13