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
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?
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@gmail.comwrote:
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/ ]
Alright! I'm going to try this immediately...
On Thu, Jun 23, 2011 at 5:06 PM, Benj Fredrick benj.fredrick@gmail.comwrote:
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@gmail.comwrote:
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/ ]
Hey Benj,
Thanks again. This is what i was looking for. It seems to do what i want except for the "author" role. Including the "author" role doesn't seem to have any effect on granting access. I'm also having a hard time to find documentation on "workflow access"...
Best,
Toon
On Thu, Jun 23, 2011 at 5:06 PM, Benj Fredrick benj.fredrick@gmail.comwrote:
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@gmail.comwrote:
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/ ]
Solved! Put the weight of my content access module lower.
Thanks again Benj & Nancy for the tips
On Thu, Jun 23, 2011 at 6:20 PM, toon severijns toon.severijns@gmail.comwrote:
Hey Benj,
Thanks again. This is what i was looking for. It seems to do what i want except for the "author" role. Including the "author" role doesn't seem to have any effect on granting access. I'm also having a hard time to find documentation on "workflow access"...
Best,
Toon
On Thu, Jun 23, 2011 at 5:06 PM, Benj Fredrick benj.fredrick@gmail.comwrote:
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@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/ ]
Excuse me, it was fixed by ticking the checkbox "Enable per content node access control settings"
On Thu, Jun 23, 2011 at 10:00 PM, toon severijns toon.severijns@gmail.comwrote:
Solved! Put the weight of my content access module lower.
Thanks again Benj & Nancy for the tips
On Thu, Jun 23, 2011 at 6:20 PM, toon severijns toon.severijns@gmail.comwrote:
Hey Benj,
Thanks again. This is what i was looking for. It seems to do what i want except for the "author" role. Including the "author" role doesn't seem to have any effect on granting access. I'm also having a hard time to find documentation on "workflow access"...
Best,
Toon
On Thu, Jun 23, 2011 at 5:06 PM, Benj Fredrick benj.fredrick@gmail.comwrote:
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@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/ ]