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

toon severijns toon.severijns at gmail.com
Thu Jun 23 15:46:57 UTC 2011


Alright! I'm going to try this immediately...

On Thu, Jun 23, 2011 at 5:06 PM, Benj Fredrick <benj.fredrick at gmail.com>wrote:

> hello toon,
>
> have you tried the workflow_access module? I think it comes with workflow,
> and should do what you're asking. (my experience with these modules is on
> D6).
>
> -Benj
> http://dtek.net
>
>
> On Thu, Jun 23, 2011 at 3:13 AM, toon severijns <toon.severijns at gmail.com>wrote:
>
>> Hello All,
>>
>> 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?
>>
>> Best,
>>
>>
>>
>> Toon
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110623/b4898d65/attachment.html 


More information about the support mailing list