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

require_capability() forces login, but require_course_login() takes into account also $CFG->forcelogin and site level

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE

      Description

      require_capability() forces login, but require_course_login() takes into account also $CFG->forcelogin and site level

      The problem manifests in places such as mod/data/view.php:
      require_course_login($course, true, $cm);

      $context = get_context_instance(CONTEXT_MODULE, $cm->id);
      require_capability('mod/data:viewentry', $context);

      where require_capability() redirects to login page, which breaks page display in RSS readers (reported by Eloy in ThunderBird on feed http://moodle.org/rss/file.php/1/153/data/13/rss.xml)

      working on patch now...

        Attachments

          Activity

            People

            Assignee:
            dougiamas Martin Dougiamas
            Reporter:
            skodak Petr Skoda
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: