Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
More complicated than I originally thought... see #1192074: Respect View_Unpublished permissions on the Content overview page, which is a similar issue for the View Unpublished module. It seems modifying admin/content is way more trouble (and pretty hacky) than installing Views Bulk Operations and overriding admin/content with VBO's View designed for that purpose.
Note also that the above linked issue presents another (which I have confirmed in Hidden Nodes): a user which can access the admin/content page, but does not have hidden node permissions, can still see hidden nodes listed in admin/content. That should probably be a separate issue.
As for this one, it seems better to focus on getting Hidden Nodes to play nice with VBO, and leave that as the solution for anyone needing better control on the admin/content page.
meh, i'd be less concerned about people seeing that page. Possibly hidden nodes still needs to be subservient to "administer nodes" or whatever perm it is for giving access to that page (we're talking basically an admin that somehow isn't for this use-case). Agreed on VBO either way
I added the actions for hide/unhide in the D7 versions and have confirmed working with VBO's view that replaces admin/content.
I also backported the actions over to the D6 version with what I presume are the appropriate changes between versions. I haven't been able to fully test this as installing VBO on my test server is causing Apache to crash for some reason - so I'm setting this as 'needs review', until someone can confirm.
Committed to dev branches of both versions.
I'm sure there are other places where these actions come in handy - rules/triggers/etc.
if you are using it with rules a blog post of some kind about how that can be used would be great; I assume then you could schedule hide / unhide state w/ rules. Haven't gotten a chance to check it out but sounds great!
I tested both 7.x-1.1 and the -dev version and neither of them worked with VBO. It "seems" to work, actions are there and the values are saved into the database, however, node permissions don't change.
I think the reason is that nodes are not re-saved (updated).
Adding
'behavior' => array('changes_property')
into the hook_action_info() in the .module file does the job.
Comments
Comment #1
btopro commentedShould also work with http://drupal.org/project/views_bulk_operations
Comment #2
komlenic commentedMore complicated than I originally thought... see #1192074: Respect View_Unpublished permissions on the Content overview page, which is a similar issue for the View Unpublished module. It seems modifying admin/content is way more trouble (and pretty hacky) than installing Views Bulk Operations and overriding admin/content with VBO's View designed for that purpose.
Note also that the above linked issue presents another (which I have confirmed in Hidden Nodes): a user which can access the admin/content page, but does not have hidden node permissions, can still see hidden nodes listed in admin/content. That should probably be a separate issue.
As for this one, it seems better to focus on getting Hidden Nodes to play nice with VBO, and leave that as the solution for anyone needing better control on the admin/content page.
Comment #3
btopro commentedmeh, i'd be less concerned about people seeing that page. Possibly hidden nodes still needs to be subservient to "administer nodes" or whatever perm it is for giving access to that page (we're talking basically an admin that somehow isn't for this use-case). Agreed on VBO either way
Comment #4
komlenic commentedTo separate this out, I created a new issue #1542702: Users with "access content overview" but not "view hidden content" perms see hidden nodes in admin/content.
I'll take a look at VBO for this one.
Comment #5
komlenic commentedI added the actions for hide/unhide in the D7 versions and have confirmed working with VBO's view that replaces admin/content.
I also backported the actions over to the D6 version with what I presume are the appropriate changes between versions. I haven't been able to fully test this as installing VBO on my test server is causing Apache to crash for some reason - so I'm setting this as 'needs review', until someone can confirm.
Committed to dev branches of both versions.
I'm sure there are other places where these actions come in handy - rules/triggers/etc.
Comment #6
btopro commentedif you are using it with rules a blog post of some kind about how that can be used would be great; I assume then you could schedule hide / unhide state w/ rules. Haven't gotten a chance to check it out but sounds great!
Comment #7
n0103 commentedBulk "hide/unhide" is not working for me with views bulk operations.
Is there someone who got the same problem? Or maybe fixed it so far?
(v 7.x-1.1)
Comment #8
my-family commentedI tested both 7.x-1.1 and the -dev version and neither of them worked with VBO. It "seems" to work, actions are there and the values are saved into the database, however, node permissions don't change.
I think the reason is that nodes are not re-saved (updated).
Adding
'behavior' => array('changes_property')
into the hook_action_info() in the .module file does the job.
Comment #9
my-family commentedHere is the patch which works for us.
Comment #10
btopro commentedfixed