[support] Set per user/per role edit permission based on workflow state?

Ms. Nancy Wichmann nan_wich at bellsouth.net
Thu Jun 23 14:13:22 UTC 2011


The first thing I would try is to set your module's weight to -2 (assuming the node module is still 0) and see if the problem is resolved.

 
Nancy 
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.



>________________________________
>From: toon severijns
>
>
>I am using the Workflow module to handle state flow of a certain content type i'm using: projects. Depending on the particular workflow state and the role of the user, the user should be granted (or revoked) edit access to the node.
>
>
>I passed on the option to use Rules as this is more for reactions on events, whereas i would need a general check on node workflow state to decide on user edit access.
>
>
>I found out about the Permissions API module which gives me the ability to grant or revoke permissions programmatically based on role of the user and workflow state of the node. I call the permissions grant/revoke functions in mymodule_preprocess_node_project in template.php. This seems to work. The only issue i am having is the "edit"local tasks menu item. This only seems to be set on the second page load. In other words, the local tasks menu seems to be built before my permissions API functions have taken effect on first page load.
>
>
>Any idea how i can solve this in a clean way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110623/fb9c0084/attachment.html 


More information about the support mailing list