--- C:/Documents and Settings/Lisa/Mes documents/Téléchargements/ubercart/uc_store/uc_store.admin.inc	Wed Sep 23 16:45:56 2009
+++ C:/www/website/lacurieuse/sites/all/modules/ubercart/uc_store/uc_store.admin.inc	Wed Feb 17 17:54:57 2010
@@ -21,33 +21,35 @@
   else {
     $output = theme('uc_admin_dashboard', $type, $tree);
   }
-
-  $results = module_invoke_all('store_status');
-
-  foreach ($results as $message) {
-    switch ($message['status']) {
-      case 'warning':
-        $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/alert.gif';
-        break;
-      case 'error':
-        $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/error.gif';
-        break;
-      case 'ok':
-      default:
-        $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/info.gif';
+  
+  if (user_access('view store status')) {
+    $results = module_invoke_all('store_status');
+    
+    foreach ($results as $message) {
+      switch ($message['status']) {
+        case 'warning':
+          $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/alert.gif';
+          break;
+        case 'error':
+          $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/error.gif';
+          break;
+        case 'ok':
+        default:
+          $icon = base_path() . drupal_get_path('module', 'uc_store') .'/images/info.gif';
+      }
+      
+      $rows[] = array('data' => array(
+        array('data' => '<img src="'. $icon .'" />'),
+        array('data' => '<strong>'. $message['title'] .'</strong>', 'nowrap' => 'nowrap'),
+        array('data' => $message['desc'], 'width' => '100%')), 'valign' => 'top');
     }
-
-    $rows[] = array('data' => array(
-      array('data' => '<img src="'. $icon .'" />'),
-      array('data' => '<strong>'. $message['title'] .'</strong>', 'nowrap' => 'nowrap'),
-      array('data' => $message['desc'], 'width' => '100%')), 'valign' => 'top');
+    
+    $header = array('&nbsp;', t('Title'), t('Description'));
+    
+    $output .= '<div style="clear: both;"><h2>'. t('Status messages:') .'</h2>'
+             . theme('table', $header, $rows) .'</div>';
   }
-
-  $header = array('&nbsp;', t('Title'), t('Description'));
-
-  $output .= '<div style="clear: both;"><h2>'. t('Status messages:') .'</h2>'
-           . theme('table', $header, $rows) .'</div>';
-
+  
   return $output;
 }
 
