MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of site level blogs

Conflicts:
	blog/rsslib.php
This commit is contained in:
Jason Fowler
2013-01-08 14:07:53 +08:00
committed by Dan Poltawski
parent 27b92b4a71
commit a201a0ff4e
+7
View 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;