Skip to content

Commit

Permalink
MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of sit…
Browse files Browse the repository at this point in the history
…e level blogs
  • Loading branch information
jsnfwlr authored and danpoltawski committed Jan 8, 2013
1 parent 7a21622 commit 21c3b51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions blog/rsslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = context_system::instance();
if (!has_capability('moodle/blog:view', $sitecontext)) {
return null;
Expand Down

0 comments on commit 21c3b51

Please sign in to comment.