Active
Project:
CCK Field Permissions
Version:
5.x-1.10
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2008 at 10:09 UTC
Updated:
21 Jul 2008 at 17:08 UTC
When I use php to display fields to handle layout in a phptemplate file, fields are shown regardless of permission settings.
What value must I use to check if I'm supposed to print the field or not?
Comments
Comment #1
picofaradpjf commentedCck_field_permissions modifies $node->content, which is an array of field groups, which has and array of the fields in a group.
Inside the field array is [#access] and it seems CCK_field_permissions sets this to 1 or null based on the access rules for CCK_field_perms. With the devel module do a dpm($node->content) and you should see what I mean.
So basically you have to add a check of $node->content[field group][field][#access] to the contemplate.
Comment #2
socialnicheguru commentedsubscribing...
how can I have the fields hidden on the mode input screen.
I see where the access check is done in content template, but I do not know how to change the input screen so it is not seen.