It'd be useful if there was a copy of admin/content/node that listed any content that is protected.

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new6.01 KB

This is based off node_admin_nodes().

grimreaper’s picture

Hello,

Thanks for the patch. Nice idea.

I wonder if we should create one permission similar to "access content overview" to be able to access this page.

izus’s picture

Status: Needs review » Needs work

Hi,

+++ b/protected_node.admin.inc
@@ -0,0 +1,142 @@
+  $multilanguage = (module_exists('translation') || db_query_range("SELECT 1 FROM {node} WHERE language <> :language", 0, 1, array(':language' => LANGUAGE_NONE))->fetchField());

the 'translation' module is not maintained and is replaced with 'entity_translation'

about the list access :
i think it should be accessible for roles that "bypass password protection", actually even a title that is not supposed to be accessed by anyone can sometimes be considered as "information disclosure"

what do you guys think about it ?

Thanks

damienmckenna’s picture

FYI I took most of the code from core, so that's core's logic on the admin/content/node page.

grimreaper’s picture

Status: Needs work » Needs review
StatusFileSize
new6.46 KB

Hello,

For the access, a new permission or "bypass password protection" as you want.

For the "translation" or "entity_translation", I see 3 options:
- keeping the same thing as in core, and when the core will update this line, we will update our.
- Using entity_translation, I test, no problem.
- putting the code from protected_node_views in protected_node and using views to provide a BO page, so it will be customizable (access, content, etc.)

The page works but the absence of filters and bulk operations orients me to the third option.

izus’s picture

Status: Needs review » Needs work
+++ b/protected_node.admin.inc
@@ -0,0 +1,141 @@
+  $multilanguage = (module_exists('entity_translation') || db_query_range("SELECT 1 FROM {node} WHERE language <> :language", 0, 1, array(':language' => LANGUAGE_NONE))->fetchField());

finally , i think we should add a check for translation module too module_exists('translation') || module_exists('entity_translation') as some old site may still have it (and also core still have this (does that worth a core task ?))

consider it RTBTC for me after this, so you can merge it and have this feature in, yeah !

grimreaper’s picture

Status: Needs work » Fixed

Ok, merged.

Thanks you all.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.