--- admin.original.module	2010-02-22 08:02:42.000000000 -0800
+++ admin.module	2010-06-10 23:29:40.000000000 -0700
@@ -285,6 +285,16 @@ function admin_set_admin_blocks($reset =
         if (count($split) === 2) {
           list($module, $delta) = $split;
           $block = module_invoke($module, 'block', 'view', $delta);
+          // Get allowed rids for this block.
+          $result = db_query("SELECT rid FROM {blocks_roles} WHERE module = '%s' AND delta = '%s'", $module, $delta);
+          $block_rids = array();
+          while ($rid = db_result($result)) {
+            $block_rids[] = $rid;
+          }
+          // Don't display the block if it is restricted to role(s) and the current user does not belong to one of the roles.
+          if (count($block_rids) && !count(array_intersect($block_rids, array_keys($GLOBALS['user']->roles))) && $GLOBALS['user']->uid != 1) {
+            continue;
+          }
           if (!empty($block['content'])) {
             if ($module === 'block') {
               global $theme;
