| Project: | Field Permissions |
| Version: | 7.x-1.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Here is what I'm using:
Drupal 7.7
field_collections v7.x-1.x-dev (downloaded last week)
field_permissions v7.x-1.0-alpha1
My symptoms:
- Fields in the collection which are restricted from edit are correctly hidden on a node form to users who don't have those fields' edit permissions
- Fields in the collection which are restricted from view are incorrectly displayed in the rendered node
- Submitting the node edit form, although restricted fields in the collection are not displayed, triggers these undefined index warnings for each restricted field:
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)Here are relevant lines I've found in the field_permissions in my own search where this integration may be added:
field_permissions.module
line 115: function field_permissions_field_access($op, $field, $obj_type, $object, $account)
admin/includes/field_access.inc
line 11: function _field_permissions_field_view_access($field_name, $field_permissions, $obj_type, $object, $account)
line 63: function _field_permissions_field_edit_access($field_name, $field_permissions, $obj_type, $object, $account)
Comments
#1
The 2nd symptom described above was resolved by adding field_access awareness to field_collections_table:
http://drupal.org/node/1284042
#2
Try update?
#3
I, too, have found that permissions for VIEWING OWN/EDITING OWN field is not working when that field is a subfield of a field collection.
To reproduce this problem, give View Own/Edit Own permissions to the authenticated user for a field collection "mycollection" and its subfield "subfield1" in a content type's "mytype". I've attached a feature with the setup I described above for testing. This feature uses:
#4
I'm hoping I can move this back into the "needs work" category, since I provided lots more info in comment #3.
#5
I got a similiar problem. I use the module to restrict access to files that users uploaded. I gave the role author the field permissions to create and view own value for such a field of the collection as "Manuscript", but NOT edit own field for that field. But the author can still edit it like removing it or uploading a new one.
Can anyone please tell me how to fix this? Thanks!