=== modified file 'modules/user/user.admin.inc'
--- modules/user/user.admin.inc	2009-04-30 16:10:10 +0000
+++ modules/user/user.admin.inc	2009-05-07 09:15:06 +0000
@@ -599,6 +599,8 @@
   }
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
 
+  $form['#attached_js'] = array(drupal_get_path('module', 'user') . '/user.permissions.js');
+
   return $form;
 }
 

=== added file 'modules/user/user.permissions.js'
--- modules/user/user.permissions.js	1970-01-01 00:00:00 +0000
+++ modules/user/user.permissions.js	2009-05-07 11:43:17 +0000
@@ -0,0 +1,38 @@
+// $Id$
+(function ($) {
+
+/**
+ * Shows checked and disabled checkboxes for inherited permissions.
+ */
+Drupal.behaviors.permissions = {
+  attach: function (context) {
+    $('table#permissions:not(.permissions-processed)').each(function () {
+      // Create dummy checkboxes.
+      $(':checkbox', this).not('[name^="2["]').not('[name^="1["]').each(function () {
+        $(this).addClass('real-checkbox');
+        $('<input type="checkbox" class="dummy-checkbox" />')
+          .attr({
+            disabled: true,
+            checked: true,
+            title: Drupal.t("This permission is inherited from the authenticated user role.")
+          })
+          .hide()
+          .insertAfter(this);
+      });
+
+      // Helper function toggles all dummy checkboxes based on the checkboxes' state.
+      var toggle = function () {
+        $(this).closest('tr')
+          .find('.real-checkbox')[this.checked ? 'hide' : 'show']().end()
+          .find('.dummy-checkbox')[this.checked ? 'show' : 'hide']();
+      };
+
+      // Initialize the authenticated user checkbox.
+      $(':checkbox[name^="2["]', this)
+        .change(toggle)
+        .each(function () { toggle.call(this); });
+    }).addClass('permissions-processed');
+  }
+};
+
+})(jQuery);

