Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6.3, 2.7.2
-
Component/s: Filepicker, JavaScript, Repositories
-
Testing Instructions:
-
Workaround:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Fixed Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Pull from Repository:
-
Pull Master Branch:wip-
MDL-46834-master -
Pull Master Diff URL:
Description
Moodle file picker drag and drop checks repository/upload:view capability at the site context, even when the file picker is in a course context.
This is not consistent with the behaviour when adding files using the '+' button and choosing to upload a file, which correctly uses the course context.
To reproduce this issue:
1. Edit the 'authenticated user' role and turn off repository/upload:view.
2. Edit the 'teacher' role and turn on repository/upload:view.
3. Create a new course.
4. Enrol a test account on the course with teacher role.
5. Log in as the test account and go to the course.
6. Click 'Add activity or resource' and choose 'File'.
7. Drag a file from your desktop into the filepicker area.
EXPECTED: File should upload.
ACTUAL: JavaScript error popup 'No permission to access this repository.'
In the same position, if you click the '+' button and choose 'Upload a file' then browse to the same file, you will be able to upload it successfully.
Slightly similar to MDL-36200 but probably not related.