MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of site level blogs
authorJason Fowler <phalacee@gmail.com>
Thu, 22 Nov 2012 07:44:27 +0000 (15:44 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 8 Jan 2013 06:07:53 +0000 (14:07 +0800)
Conflicts:
blog/rsslib.php

blog/rsslib.php

index 770fb06..37e3532 100644 (file)
@@ -163,6 +163,13 @@ function blog_rss_get_feed($context, $args) {
         return '';
     }
 
+    if ($CFG->bloglevel == BLOG_SITE_LEVEL) {
+        if (isguestuser()) {
+            debugging(get_string('nopermissiontoshow','error'));
+            return '';
+        }
+    }
+
     $sitecontext = get_context_instance(CONTEXT_SYSTEM);
     if (!has_capability('moodle/blog:view', $sitecontext)) {
         return null;