From 970b69c3ab71b3fcc99d157192bdf4e215604583 Mon Sep 17 00:00:00 2001 From: jerome Date: Tue, 28 Oct 2008 04:03:12 +0000 Subject: [PATCH] MDL-15352: check that the user exists on the remote server and that is allowed to access the file he's requesting --- lang/en_utf8/repository_remotemoodle.php | 3 ++- repository/remotemoodle/repository.class.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en_utf8/repository_remotemoodle.php b/lang/en_utf8/repository_remotemoodle.php index 4fd58aa621d..4321b422865 100644 --- a/lang/en_utf8/repository_remotemoodle.php +++ b/lang/en_utf8/repository_remotemoodle.php @@ -10,4 +10,5 @@ $string['remoterep_name'] = 'Remote Moodle Repository'; $string['remoterep_description'] = 'Allow the service to be discovered

'; $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'; \ No newline at end of file +$string['usernotfound'] = 'The user $a is not registered into the remote Moodle'; +$string['usercannotaccess'] = 'You ($a) cannot access to this file'; \ No newline at end of file diff --git a/repository/remotemoodle/repository.class.php b/repository/remotemoodle/repository.class.php index 0b01b50c9c3..4d3f19feb9f 100644 --- a/repository/remotemoodle/repository.class.php +++ b/repository/remotemoodle/repository.class.php @@ -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))); }