mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-15352: check that the user exists on the remote server and that is allowed to access the file he's requesting
This commit is contained in:
parent
4ad46f21d3
commit
970b69c3ab
@ -10,4 +10,5 @@ $string['remoterep_name'] = 'Remote Moodle Repository';
|
||||
$string['remoterep_description'] = 'Allow the service to be discovered<br><br>';
|
||||
$string['connectionfailure'] = 'Failed to retrieve file listing - The host moodle has either a version older than 2.0, either its Moodle Remote Repository service hasn\'t been activated';
|
||||
$string['failtoretrievelist'] = 'List could not be retrieved or is empty';
|
||||
$string['usernotfound'] = 'The user $a is not registered into the remote Moodle';
|
||||
$string['usernotfound'] = 'The user $a is not registered into the remote Moodle';
|
||||
$string['usercannotaccess'] = 'You ($a) cannot access to this file';
|
@ -61,7 +61,6 @@ class repository_remotemoodle extends repository {
|
||||
|
||||
$browser = get_file_browser();
|
||||
$fileinfo = $browser->get_file_info(get_context_instance_by_id($contextid), $filearea, $itemid, $filepath, $filename);
|
||||
$this->log($fileinfo);
|
||||
if (empty($fileinfo)) {
|
||||
exit(mnet_server_fault(9016, get_string('usercannotaccess', 'repository_remotemoodle', $file)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user