From: dhawes Date: Tue, 25 Jan 2005 01:57:56 +0000 (+0000) Subject: bug #2420 fix X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c0c6f36bf2c3680185c568184c968fcb8c55194f;p=moodle.git bug #2420 fix --- diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index c3a13f5570..17276d0074 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -73,7 +73,7 @@ class block_rss_client extends block_base { //if the user is an admin, course teacher, or all user are allowed - // then allow the user to add rss feeds - if ( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) { + if ( !isguest() && (isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher)) ) { $output .= '
'. get_string('block_rss_feeds_add_edit', 'block_rss_client') .'

'; } diff --git a/blocks/rss_client/block_rss_client_action.php b/blocks/rss_client/block_rss_client_action.php index 7e9bca831c..8e856fb7ab 100644 --- a/blocks/rss_client/block_rss_client_action.php +++ b/blocks/rss_client/block_rss_client_action.php @@ -46,9 +46,10 @@ if ($courseid != 'none'){ $isteacher = isteacher($courseid); } + //if the user is an admin or course teacher then allow the user to //assign categories to other uses than personal - if (! ( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) ) { + if (isguest() || !( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) ) { error(get_string('noguestpost', 'forum'), $referrer); }