Commit 5a65b471 authored by Tom Kirkpatrick's avatar Tom Kirkpatrick Committed by Tim Plunkett
Browse files

Issue #1320924 by mrfelton: Fixed field permissions incorrectly processed.

parent 790c8a9c
......@@ -531,8 +531,9 @@ function field_collection_item_access($op, FieldCollectionItemEntity $item = NUL
}
$op = $op == 'view' ? 'view' : 'edit';
// Access is determined by the entity and field containing the reference.
$field = field_info_field($item->field_name);
$entity_access = entity_access($op == 'view' ? 'view' : 'update', $item->hostEntityType(), $item->hostEntity(), $account);
return $entity_access && field_access($op, $item->field_name, $item->hostEntityType(), $item->hostEntity(), $account);
return $entity_access && field_access($op, $field, $item->hostEntityType(), $item->hostEntity(), $account);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment