Love the VBO module! I tried making a view for my users to mass update their blog posts, but found that they where not able to execute any operations without the administer-nodes permission. I do not give them this permission and instead use the "override node options" module to specify what publishing options they have per content type (something that core should have built-in). Is there any way VBO can use the permissions specified by override node options?
Comments
Comment #1
infojunkieIt is not strictly true that VBO requires "administer nodes" permission. Perhaps the action you're trying to grant your users does require that permission, and VBO merely enforces that request. Which action are you trying to expose? Note that users do need the permission "edit own blog content" to edit their own nodes.
Comment #2
nicktech commentedI am trying to give them the option to mass unpublish their content. I give them this option for their own content using the override node options module without marking administer nodes. Every node they would be mass unpublishing they authored and they have access to edit.
Comment #3
philsward commentedI too am running into this same problem... I can't seem to get the "unpublish" to work for "authenticated users" who have access to only their information...
I've tried both the node_mass_update and node_unpublish_action, neither of which work. I can edit the node all by itself and unpublish the node without a problem, but vbo won't unpublish it. The site is a classified website so on the view page for the user, I have a "live" column which basically shows if the node is published/live (yes) or unpublished (no).
Now get this... I can manually edit a node, unpublish it, it shows up as unpublished in the view, then I apply a "publish" VBO to the unpublished nodes and it WILL publish them. Delete VBO works fine too.
So, I have: Delete, Publish & Unpublish as VBO options for the users.
Next question is probably whether the permissions are enabled and yes the VBO permission for unpublish is enabled.
Comment #4
infojunkie@philsward: How does VBO refuse to unpublish? Does it say "Skipped ACTION on NODE because of insufficient permissions"? Does the log report anything? And just to make sure I understand properly, are the publish and delete actions working properly for the same user, on the same nodes?
Comment #5
philsward commentedTo be honest, I am not seeing any error's on the unpublish. I skimmed through the watchdog logs but didn't see anything really out of place and it doesn't give any type of error when the actual action is performed.
This is what I do receive if I turn on the "Show proccess results" option or whatever it is in the view:
For the delete and publish permissions, yes, they are both working just fine for the same user which makes it kind of a weird issue... I did check for the admin account and it works fine (as expected) so no troubleshooting help there...
I double checked just now to make sure that "Authenticated User" had the permission: execute Unpublish (node_mass_update) which it does, but didn't make a difference.
As of right now, I have the "unpublish" permission turned off to disable it from my users, but if you want me to turn it on so you can create an account and test it, let me know.
Comment #6
infojunkieYou wouldn't happen to have a rule or trigger that automatically publishes content?
Go ahead and create a test account for me. It might be necessary to make it admin though...
Comment #7
philsward commentedI don't have a rule that automatically publishes content, but I do have one that automatically unpublishes content, 3 months after it is published...
Comment #8
infojunkieClosed unless I hear back from OP.
Comment #9
maijs commentedThis is valid issue - if Drupal site uses Override Node Options module and leave out, say, "Publish" permission that would be great if VBO supported this as Drupal core lacks both good administration panel (that's where VBO comes in) and granular permission for basic operations like publish and unpublish.
I have a site where I do not let content managers to publish the content, only create and edit own. VBO lets users to publish the content through bulk operations, never taking into account override_node_options permissions.
Comment #10
mustanggb commentedWhilst not strictly related to integration with Override Node Options it turns out to be relatively easy to remove the need for the "administer nodes" permission for bulk operation in a custom module thus...
Alternatively you could do something like...
...and then include a modified
node_access()in your moduleI haven't checked but I think
hook_views_bulk_operations_object_info_alterwas introduced in6.x-1.10so you will need to update, if you haven't already.Comment #11
bojanz commentedIn this case, it makes more sense for Override Node Options to integrate with VBO (by using the solution in #10)