Publish Content breaks Workflow Access

beday00 - October 21, 2009 - 06:18
Project:Publish Content
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:malaussene
Status:needs review
Description

I ran into an issue when implementing the content publish module on a site running workflow, workflow access, and module grants. The issue seems to be caused by the permissions being implemented with a access callback in the hook_menu_alter. Changing it to a hook_access call allows publish content to play nicely workflow access and based on my limited testing it didn't break any of its existing functionality. Can someone test and confirm the attached patch?

The exact scenario I was having issues with are as follows:
1. Create a content type 'event'
2. Create a content type 'video'
3. Enable the following modules: workflow, workflow access, module grants, publish content
4. Create a role 'event publisher', 'event author', and 'video admin'
5. Create an event workflow according to http://drupal.org/node/408052
6. When setting up the workflow, make sure 'event publisher' and 'event author' can view events in draft state
7. Grant 'publish video content' and 'publish own video content' to role 'video admin'
8. Login with an 'event author' user and create an event
9. Logout and login with an 'event publisher' user
10. Try and view the node you just created
11. Apply patch and it should now let you view the node in draft state

If you have trouble recreating the issue or if you have any trouble with the patch please let me know and I'll take a look at it.

AttachmentSize
publishcontent.patch682 bytes

#1

malaussene - October 22, 2009 - 18:26
Assigned to:Anonymous» malaussene

Thanks beday00,
could you test the slightly modified patch on your setup.
you will need to run update.php or rebuild the menu.

#2

malaussene - October 22, 2009 - 18:29

... and the missing patch

AttachmentSize
publishcontent-hook_access.patch 817 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.