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 56f4d0e commit cb838a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions blog/rsslib.php
Expand Up @@ -163,6 +163,13 @@ function blog_rss_get_feed($context, $args) {
return ''; return '';
} }


if ($CFG->bloglevel == BLOG_SITE_LEVEL) {
if (isguestuser()) {
debugging(get_string('nopermissiontoshow','error'));
return '';
}
}

$sitecontext = context_system::instance(); $sitecontext = context_system::instance();
if (!has_capability('moodle/blog:view', $sitecontext)) { if (!has_capability('moodle/blog:view', $sitecontext)) {
return null; return null;
Expand Down

0 comments on commit cb838a3

Please sign in to comment.