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

Conflicts:
	blog/rsslib.php
  • Loading branch information
jsnfwlr authored and danpoltawski committed Jan 8, 2013
1 parent 27b92b4 commit a201a0f
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 = get_context_instance(CONTEXT_SYSTEM);
if (!has_capability('moodle/blog:view', $sitecontext)) {
return null;
Expand Down

0 comments on commit a201a0f

Please sign in to comment.