Community & Support

let content editors view/edit their own unpublished nodes

I need to let content writers to view and revise their own unpublished nodes. AFAICT, the only way to provide a list of unpublished content is through admin/content/node/overview which gets enabled by turning on the "administer nodes" permissions. However, this also seems to enable the editing of all content types, which isn't what I want at all.

Thanks!

Comments

Try the View Unpublished module

Take a look at the View Unpublished module. It "allows you to grant access for specific user roles to view unpublished nodes of a specific type", which sounds like what you want.

The Workspace module is another alternative. I haven't used it myself, so I don't know a great deal about it, but it might serve your needs.

I just wish I could find a module that would let me create menus showing links to unpublished pages, so I could create a menu of upcoming pages and then restrict access to the menu block by role. It's damned hard to build unpublished nodes into your navigational structure for the benefit of content editors.

Hope that helps.

Now I'm just going to think aloud about my own problem, so feel free to wander off.

I can think of several ways to build a menu of links to unpublished nodes, so that I could have a block for content editors.

1) I could make them hand code the HTML into a plain old block every time they add a node. On the site in question that would only have to happen about once every nine months, so it might be feasible to make the admin do it. But the admins tend not to be terribly HTML savvy, so it would be difficult and error-prone for them.

2) I could create a custom block containing PHP that completely bypasses Drupal, yanks the data out of the database, and spits it back out in an appropriate form. Crude, and it would essentially eliminate any configurability, but it would work.

3) I could use Views to create a custom view of the data, which is basically the same as the last option but more elegant. Or I could do that if I trusted Views, which I don't. It gives my well-meaning but inexpert admins way too much rope to hang themselves with.

4) I could write block declaration into the theme's template.php and use it to load the data based on menu_tree_all_data().

5) I could write a module to do the same thing. The pinnacle of elegance, of course, but it also makes it very easy for people to forget why the module exists and turn it off or delete it or all manner of tomfoolery. I just don't like making themes super-dependent on specific modules; it makes the site fragile, and much more difficult to maintain in the long term, because you need someone who knows both theming and module development.

I think I'll give option 4 a shot.

wdmartin, you don't trust

wdmartin, you don't trust views for creating such a simple query? Tell your admins to keep out of Views or uninstall the Views UI module so that they won't be tempted to use it.

Ah, but there's a problem with that ...

... which is that I'm no longer going to be working there to clean things up if something goes wrong. My job ends in the immediate future. So, I'm trying to future-proof things before I leave. As much as possible, any way.

_

Thats exactly why the views_ui module is there as a kill switch. Setup your views, test everything, turn off the ui. I've gotten into the habit of completely recreating a much slimmed down admin page with views and views_bulk_operations and turning off the ui.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.