Hi,

I am using the cck 6.x-3.0-alpha3+13-dev module and I am using the content multi-group module to get field of tables in the node edit form and node view. I noticed that on node view the fields that are supposed to be hidden by permissions for particular users are able to see the headers but not the data. I was able to fix it in the fix content_multigroup.node_view.inc. Here is the patch:

--- a/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_view.inc
+++ b/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_view.inc
@@ -25,7 +25,7 @@ function _content_multigroup_fieldgroup_view(&$node, &$element, $group, $context
   $group_fields = array();
   foreach ($content_type['fields'] as $field_name => $field) {
     if (isset($group['fields'][$field_name]) && isset($element[$field_name])) {
-      if (!isset($element[$field_name]['#access']) || $element[$field_name]['#access']) {
+      if (!isset($element[$field_name]['field']['#access']) || $element[$field_name]['field']['#access']) {
         $group_fields[$field_name] = $field;
       }
     }

You can see from the code that access test was checking the wrong value. The access value is in $element[$field_name]['field']['#access'].

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dmundra’s picture

Status: Active » Needs review

Updating the status to needs review.

dmundra’s picture

dmundra’s picture

Issue summary: View changes

Fixed typos

dmundra’s picture

Version: 6.x-3.x-dev » 6.x-3.0-alpha4
Issue summary: View changes

Still an issue with 6.x-3.0-alpha4. Updated the version of this issue.