Permalink
Browse files

MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of sit…

…e level blogs

Conflicts:
	blog/rsslib.php
  • Loading branch information...
1 parent 890066d commit 591b34218c9ab95cf137987f0bb8d4e60e28936a @jsnfwlr jsnfwlr committed with danpoltawski Nov 22, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 blog/rsslib.php
View
@@ -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;

0 comments on commit 591b342

Please sign in to comment.