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

Teachers cannot access Server files (No permission to access)

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MDL-38474-master
    • Hide
      1. Navigate to Home ► Site administration ► Users ► Permissions ► Define roles
      2. Create a new role
        • Call it Server files
        • Allow the capability repository/local:view
      3. Navigate to Home ► Site administration ► Users ► Permissions ► Assign system roles
      4. Select Server files
      5. Add the users who are teachers in some courses in this list
      Show
      Navigate to Home ► Site administration ► Users ► Permissions ► Define roles Create a new role Call it Server files Allow the capability repository/local:view Navigate to Home ► Site administration ► Users ► Permissions ► Assign system roles Select Server files Add the users who are teachers in some courses in this list
    • Hide

      Test pre-requisites

      1. Create a 1.9 and add some course files
      2. Use the 1.9 instance and upgrade it to 2.2, then to 2.3, 2.4 and master to test each version against it.
      3. Enable Server files repository

      Test steps

      1. Login as a teacher
      2. Add a folder to a course and add files:
        • Make sure you can browse the Server files repository
        • Make sure you can browse the Course files repository (legacy from 1.9)
        • Make sure any other repository does not throw the error 'No permission to access'

      Test 2

      1. Repeat MDL-36426 testing instructions (I'm sorry!)

      Test 3

      1. Repeat MDL-37852 testing instructions (I'm very sorry!)
      Show
      Test pre-requisites Create a 1.9 and add some course files Use the 1.9 instance and upgrade it to 2.2, then to 2.3, 2.4 and master to test each version against it. Enable Server files repository Test steps Login as a teacher Add a folder to a course and add files: Make sure you can browse the Server files repository Make sure you can browse the Course files repository (legacy from 1.9) Make sure any other repository does not throw the error 'No permission to access' Test 2 Repeat MDL-36426 testing instructions (I'm sorry!) Test 3 Repeat MDL-37852 testing instructions (I'm very sorry!)

      Teachers (or any other role on a course context), are not able to browse the Server files repository. Error message: "No permission to access this repository"

      This is a regression created by MDL-36426 when the security of the repositories have been enhanced.

      The problem here being that the Server files repository (repository/local) is defined on a system context, but browse course files. So the logic checks that the user has the capability on a system context, who doesn't (cannot be a teacher on a system level).

      A workaround is to create a new role, with the only capability repository/local:view set to allowed, and give that role to teachers but on a system level.

      This could apply to coursefiles too

            fred Frédéric Massart
            fred Frédéric Massart
            Marina Glancy Marina Glancy
            Damyon Wiese Damyon Wiese
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.