Add a route get "resources/*path* that routes to FilesController#resource
Add a class-wide dictionary to FilesController for the resources it can serve
Each grader (CheckerGrader, JunitGrader, etc) can install its relevant files in that dictionary: the key is the path to be used, and the value is the absolute path to the resource in the filesystem
FilesController#resource will use the dictionary as an allow-list of what resources to serve, and reject all other paths
Example usage: A CheckerGrader would send a job to Orca containing resources/tester.jar, resources/javalib.jar, files/...the instructor test files... and files/...the student submission.... The resources paths are static, and do not live in the same namespace (filesystem directory) as other uploaded files, hence the need for the new route.
get "resources/*path*
that routes toFilesController#resource
FilesController
for the resources it can serveFilesController#resource
will use the dictionary as an allow-list of what resources to serve, and reject all other pathsExample usage: A CheckerGrader would send a job to Orca containing
resources/tester.jar
,resources/javalib.jar
,files/...the instructor test files...
andfiles/...the student submission...
. Theresources
paths are static, and do not live in the same namespace (filesystem directory) as other uploaded files, hence the need for the new route.