diff -ruN /home/dan/tmp/cvs/moodle/blocks/moodleblock.class.php ./blocks/moodleblock.class.php
--- /home/dan/tmp/cvs/moodle/blocks/moodleblock.class.php	2007-07-17 10:26:30.000000000 +0100
+++ ./blocks/moodleblock.class.php	2007-07-23 09:06:01.000000000 +0100
@@ -199,6 +199,13 @@
      * @return boolean
      */
     function is_empty() {
+
+        $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
+        
+        if ( !has_capability('moodle/block:view', $context) ) {
+            return true;
+        }
+
         $this->get_content();
         return(empty($this->content->text) && empty($this->content->footer));
     }
diff -ruN /home/dan/tmp/cvs/moodle/lang/en_utf8/role.php ./lang/en_utf8/role.php
--- /home/dan/tmp/cvs/moodle/lang/en_utf8/role.php	2007-07-17 10:26:32.000000000 +0100
+++ ./lang/en_utf8/role.php	2007-07-23 10:10:02.000000000 +0100
@@ -13,6 +13,7 @@
 $string['blog:manageofficialtags'] = 'Manage official tags';
 $string['blog:managepersonaltags'] = 'Manage personal tags';
 $string['blog:view'] = 'View blog entries';
+$string['block:view'] = 'View block';
 $string['calendar:manageentries'] = 'Manage any calendar entries';
 $string['calendar:manageownentries'] = 'Manage own calendar entries';
 $string['capabilities'] = 'Capabilities';
diff -ruN /home/dan/tmp/cvs/moodle/lib/accesslib.php ./lib/accesslib.php
--- /home/dan/tmp/cvs/moodle/lib/accesslib.php	2007-07-22 22:07:19.000000000 +0100
+++ ./lib/accesslib.php	2007-07-23 10:17:57.000000000 +0100
@@ -2853,7 +2853,7 @@
             $block = get_record('block', 'id', $cb->blockid);
 
             $SQL = "select * from {$CFG->prefix}capabilities where contextlevel = ".CONTEXT_BLOCK."
-                    and component = 'block/$block->name'";
+                    and ( component = 'block/$block->name' or component = 'moodle')";
         break;
 
         default:
@@ -3332,7 +3332,11 @@
         break;
 
         case CONTEXT_BLOCK:
-            $string = get_string('blockname', 'block_'.basename($component));
+            if( $component == 'moodle' ){
+                $string = get_string('block');
+            }else{
+                $string = get_string('blockname', 'block_'.basename($component));
+            }
         break;
 
         default:
diff -ruN /home/dan/tmp/cvs/moodle/lib/db/access.php ./lib/db/access.php
--- /home/dan/tmp/cvs/moodle/lib/db/access.php	2007-07-17 10:26:35.000000000 +0100
+++ ./lib/db/access.php	2007-07-23 10:07:45.000000000 +0100
@@ -1036,6 +1036,17 @@
             'admin' => CAP_ALLOW
         )
     ),    
+
+    'moodle/block:view' => array(
+
+        'captype' => 'read',
+        'contextlevel' => CONTEXT_BLOCK,
+        'legacy' => array(
+            'guest' => CAP_ALLOW,
+            'user' => CAP_ALLOW
+        )
+    ),
+
 );
 
 ?>
diff -ruN /home/dan/tmp/cvs/moodle/version.php ./version.php
--- /home/dan/tmp/cvs/moodle/version.php	2007-07-22 22:07:19.000000000 +0100
+++ ./version.php	2007-07-23 10:08:55.000000000 +0100
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2007072100;  // YYYYMMDD = date
+    $version = 2007072101;  // YYYYMMDD = date
                             //       XY = increments within a single day
 
     $release = '1.9 dev';   // Human-friendly version name
