Index: vertical_tabs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/vertical_tabs/vertical_tabs.module,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 vertical_tabs.module
--- vertical_tabs.module	17 Aug 2008 05:58:44 -0000	1.1.2.5
+++ vertical_tabs.module	11 Oct 2008 10:07:26 -0000
@@ -73,8 +73,10 @@
     $javascript = array();
     // Iterate through the form, finding fieldsets.
     foreach (element_children($form) as $key) {
-      // We need to make sure that the element we have is a fieldset.
-      if (isset($form[$key]['#type']) && $form[$key]['#type'] == 'fieldset') {
+      // We need to make sure that the element we have is a fieldset
+      // and the user has access to this field.
+      if (isset($form[$key]['#type']) && $form[$key]['#type'] == 'fieldset' &&
+        (!isset($form[$key]['#access']) || $form[$key]['#access'] != FALSE)) {
         // Add the JavaScript.
         $javascript[$key] = array('name' => $form[$key]['#title']);
         // If there's a summary callback, then add it.
