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],
);
}
}
...
Comments
Comment #1
westbywest commentedSubscribing
Comment #2
westbywest commentedIncluding 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: