Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.27
diff -u -r1.27 update.module
--- modules/update/update.module	13 Nov 2008 20:27:30 -0000	1.27
+++ modules/update/update.module	25 Nov 2008 10:04:58 -0000
@@ -51,6 +51,21 @@
  */
 define('UPDATE_UNKNOWN', -2);
 
+/** 
+  * Implementation of hook_perm().
+  */
+function update_perm() {
+  return array(
+    'view update notifications' => array(
+      'title' => t('View software update notifications'),
+      'description' => t('Enable screen messages that notify users about available software updates and problems with the update module.'),
+    ),
+    'administer update settings' => array(
+      'title' => t('Administer the update module'),
+      'description' => t('Permit users to configure the settings associated with this module and check for available updates.'),
+    ),
+  );
+}
 
 /**
  * Implementation of hook_help().
@@ -67,15 +82,20 @@
       $status = update_requirements('runtime');
       foreach (array('core', 'contrib') as $report_type) {
         $type = 'update_' . $report_type;
-        if (isset($status[$type]['severity'])) {
-          if ($status[$type]['severity'] == REQUIREMENT_ERROR) {
-            drupal_set_message($status[$type]['description'], 'error');
-          }
-          elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) {
-            drupal_set_message($status[$type]['description'], 'warning');
+        if (user_access('view update notifications')) {
+          if (isset($status[$type]['severity'])) {
+            if ($status[$type]['severity'] == REQUIREMENT_ERROR) {
+              drupal_set_message($status[$type]['description'], 'error');
+            }
+            elseif ($status[$type]['severity'] == REQUIREMENT_WARNING) {
+              drupal_set_message($status[$type]['description'], 'warning');
+            }
           }
         }
       }
+      if (user_access('administer update settings')) {
+        return '<p>' . t('See the <a href="@available_updates">available updates</a> page for information on installed modules and themes with new versions released.', array('@available_updates' => url('admin/reports/updates'))) . '</p>';
+      }
 
     case 'admin/reports/updates/settings':
     case 'admin/reports/status':
@@ -83,8 +103,8 @@
       break;
 
     case 'admin/help#update':
-      $output = '<p>' . t("The Update status module periodically checks for new versions of your site's software (including contributed modules and themes), and alerts you to available updates.") . '</p>';
-      $output .= '<p>' . t('The <a href="@update-report">report of available updates</a> will alert you when new releases are available for download. You may configure options for update checking frequency and notifications at the <a href="@update-settings">Update status module settings page</a>.', array('@update-report' => url('admin/reports/updates'), '@update-settings' => url('admin/reports/updates/settings'))) . '</p>';
+      $output = '<p>' . t("The Update status module periodically checks for new versions of your site's software (including contributed modules and themes), and can alert administrator's to available updates.") . '</p>';
+      $output .= '<p>' . t('The <a href="@update-report">report of available updates</a> will alert you when new releases are available for download. You may configure options for update checking frequency and notifications at the <a href="@update-settings">Update status module settings page</a>. You must have the proper update module <a href="@permissions">permissions</a> set to view these pages.', array('@update-report' => url('admin/reports/updates'), '@update-settings' => url('admin/reports/updates/settings'), '@permissions' => url('admin/user/access'))) . '</p>';
       $output .= '<p>' . t('Please note that in order to provide this information, anonymous usage statistics are sent to drupal.org. If desired, you may disable the Update status module from the <a href="@modules">module administration page</a>.', array('@modules' => url('admin/build/modules'))) . '</p>';
       $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@update">Update status module</a>.', array('@update' => 'http://drupal.org/handbook/modules/update')) . '</p>';
       return $output;
@@ -93,7 +113,7 @@
       // Otherwise, if we're on *any* admin page and there's a security
       // update missing, print an error message about it.
       if (arg(0) == 'admin' && strpos($path, '#') === FALSE
-          && user_access('administer site configuration')) {
+          && user_access('view update notifications')) {
         include_once DRUPAL_ROOT . '/includes/install.inc';
         $status = update_requirements('runtime');
         foreach (array('core', 'contrib') as $report_type) {
@@ -119,7 +139,7 @@
     'title' => 'Available updates',
     'description' => 'Get a status report about available updates for your installed modules and themes.',
     'page callback' => 'update_status',
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('view update notifications'),
     'weight' => 10,
   );
   $items['admin/settings/updates'] = array(
@@ -127,12 +147,12 @@
     'description' => 'Change frequency of checks for available updates to your installed modules and themes, and how you would like to be notified.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('update_settings'),
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer update settings'),
   );
   $items['admin/reports/updates/check'] = array(
     'title' => 'Manual update check',
     'page callback' => 'update_manual_status',
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer update settings'),
     'type' => MENU_CALLBACK,
   );
 
@@ -237,7 +257,7 @@
   $status = $project['status'];
   if ($status != UPDATE_CURRENT) {
     $requirement['reason'] = $status;
-    $requirement['description'] = _update_message_text($type, $status, TRUE);
+    $requirement['description'] = _update_message_text($type, $status, user_access('administer update settings'));
     $requirement['severity'] = REQUIREMENT_ERROR;
   }
   switch ($status) {
@@ -472,6 +492,11 @@
 
     case UPDATE_UNKNOWN:
     case UPDATE_NOT_CHECKED:
+      // users who can't administer update module should not see these technical messages
+      if (!user_access('administer update settings')) {
+        break;
+      }
+
       if ($msg_type == 'core') {
         $text = t('There was a problem determining the status of available updates for your version of Drupal.', array(), $langcode);
       }
