Description
When solving issue openfun/openedx-docker#106 (Controlling access to instructor dashboard CSV export files) we had to determine if user requesting the file was belonging to course staff.
Solution implemented by #15 may not safely scale if user belongs to a large amount of courses because we request ORM for an unknown number of lines and then calculate each course key sha1
Considered solutions
Retrieve course_key from HTTP referer
Implement specific DjangoStorage
- Override view listing available files (
list_report_downloads) to append course_key to filenames
- Monkey patch edX
ReportStore class
None of these solutions were considered satisfying.
Description
When solving issue openfun/openedx-docker#106 (Controlling access to instructor dashboard CSV export files) we had to determine if user requesting the file was belonging to course staff.
Solution implemented by #15 may not safely scale if user belongs to a large amount of courses because we request ORM for an unknown number of lines and then calculate each course key sha1
Considered solutions
Retrieve course_key from HTTP refererImplement specific DjangoStoragelist_report_downloads) to append course_key to filenamesReportStoreclassNone of these solutions were considered satisfying.