Line 56 of field_collection_table.module doesn't check field_access() before displaying fields. I amended the code as such:

      foreach (field_info_instances('field_collection_item', $field['field_name']) as $field_collection_item) {
      // Check field permissions.
      global $user;
            $field_info = field_info_field($field_collection_item['field_name']);
            if (field_access('view', $field_info, 'node', $entity, $user)) {
                  $weight = $field_collection_item['display']['default']['weight'];
                  $field_names[$weight] = $field_collection_item['field_name'];
                  $header[$weight] = array(
	            'data' => $field_collection_item['label'],
	            'class' => $field_names[$weight],
	          ); 
            }
      }
...
CommentFileSizeAuthor
#2 field_access-12840420-2.patch2.51 KBwestbywest

Comments

westbywest’s picture

Subscribing

westbywest’s picture

StatusFileSize
new2.51 KB

Including patch to field_collection_table.module and theme.inc to resolve the issue described above, and to suppress 'undefined index' warnings that appear for fields whose view permissions are not set for the active user:

Notice: Undefined index: #title in theme_field_collection_table_multiple_value_fields() (line 85 of /blah/blah/blah/sites/all/modules/field_collection_table/theme/theme.inc)