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

Allow guests to view wiki on the frontpage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Wiki (2.x)
    • Labels:
    • Testing Instructions:
      Hide

      Test 1:

      1. Create a new instance of moodle
      2. As admin/manager create a wiki module on the front page and add at least one page to it
      3. Log out (and make sure you don't log in as guest)
      4. Make sure you are able to view wiki on the front page, click on all available links and make sure everything is displayed (history, files, map, compare revisions, etc).
      5. Log in as an ordinary user
      6. Make sure you are able to view wiki

      Test 2:

      1. Create an instance of wiki module in a course
      2. Make sure student is able to see the link to the wiki on the course page and can click on it and view the actual wiki. Copy the URL to the wiki
      3. As admin prohibit 'mod/wiki:viewpages' in the student role
      4. Login again as a student
      5. Make sure you don't see the link to the wiki on the course page and if you paste URL you saved before you get a permission error.
      Show
      Test 1: Create a new instance of moodle As admin/manager create a wiki module on the front page and add at least one page to it Log out (and make sure you don't log in as guest) Make sure you are able to view wiki on the front page, click on all available links and make sure everything is displayed (history, files, map, compare revisions, etc). Log in as an ordinary user Make sure you are able to view wiki Test 2: Create an instance of wiki module in a course Make sure student is able to see the link to the wiki on the course page and can click on it and view the actual wiki. Copy the URL to the wiki As admin prohibit 'mod/wiki:viewpages' in the student role Login again as a student Make sure you don't see the link to the wiki on the course page and if you paste URL you saved before you get a permission error.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      wip-MDL-61163-master

      Description

      If wiki is created on the frontpage and capability mod/wiki:viewpage is given to guests, guests are still not able to view wiki without pressing "Log in as a guest".

      This is different from the situation with mod_forum and mod_resource - if relevant view capabilitiy is given to the guests they can view the resources.

      This is just a matter of replacing require_login() with require_course_login()

      During development I noticed two more bugs: 1. Capability to view wiki is allowed for guests but not allowed for authenticated users on a frontpage, meaning that guests are able to see the module but as soon as they login they no longer can see it
      2. When displaying the list of modules link to the wiki is shown even when user does not have capability to view it. When user clicks on it an error is displayed.

        Attachments

          Activity

            People

            • Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Tim Hunt
              Integrator:
              Jake Dallimore
              Tester:
              Gladys Basiana
              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:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h