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:08:07 +08:00
committed by Dan Poltawski
parent 890066d6dc
commit 591b34218c
+7
View File
@@ -109,6 +109,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;