--- file.php.OLD	2008-11-24 14:06:50.000000000 +0000
+++ file.php	2008-12-17 12:01:23.000000000 +0000
@@ -90,7 +90,7 @@
     }
 
     //Check for "security" if the course is hidden or the activity is hidden
-    if (!$isblog and (!$course->visible || !$cm->visible) && (!has_capability('moodle/course:viewhiddenactivities', $context))) {
+    if (!$isblog and (!$course->visible || !$cm->visible) && (!has_capability('moodle/course:viewhiddenactivities', $context, $userid))) {
         rss_not_found();
     }
 

