node-type.tpl.php code snippets for fields to respect WF access rights
| Project: | Workflow Fields |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | kratib |
| Status: | active |
Jump to:
I use workflow_fields with filefield, and custom node-type.tpl.php files with my zen theme.
While the filefield project page recommend the use of CCK_field_permissions, I wonder if WF works too. My problem seems to be about roles, not states:
To keep it simple, there are a public and a private workflow states.
Users in a "public" role can only see nodes on a public state. Admins can see all of them.
Now assume we're seeing a node on a public state.
I wanted public users to be able to download files containing extracts (public files) only meanwhile admins could download full-versions (private files) as well.
Therefore we have private and public filefields.
In this public state, public users are given grant to only see the the public filefields... but they can also see the private ones.
Is it a consequence of theming? If yes, what should be the proper code to write? I couldn't find anything on this in the drupal.org documentation.
Should I rather use CCK_field_permissions?
Many thanks in advance,
Arsène

#1
I assume you're talking about viewing the node, not editing it.
I tested that the module does hide filefields in the normal case, with no custom theming. Can you please confirm this on your side?
Does the WF logic work on other, simpler fields such as text boxes?
Does the watchdog say anything at all related to 'workflow fields' ?
Thanks!