Pregunta

I've looking around the internet for a module (Drupal 7) which helps to set the create/edit/publish permissions. I can't find a module which does the following:

  • Verified users can create own unpublished content.
  • Verified users can NOT publish any or own content.
  • Administrators can create, edit and publish any content, no matter it's published or not.
  • When the content is published, verified users can edit their own, but it will automaticly unpublished.

For example: A kind of blog where everyone can post, but it has to be verified by an administrator. After changing the content, it has to be verified again.

¿Fue útil?

Solución

It seems that you can use Drupal's own features for almost all of the tasks you need:

1 - If you give authenticated users create content permissions and you check out the "published" checkbox in your contet types' settings they can create upublished content;

2 - Authenticated users normally have no administer nodes permission, so they cannot publish their own content (or any);

3 - Administrators can do everything they want, provided they have administer nodes permission.

4 - You can set edit own content to authenticated users.

You need one more trick to unpublish content when it is edited. I don't know of any contrib module providing this functionality, but you can easily add it to your custom module, e.g.:

function <YOUR_MODULE_NAME>_node_presave($node) {
  if (! user_access("administer nodes")) { // skip if user has admmin permission
    $node->status = 0; // unpublish the node
  }
}

Otros consejos

Like parnatt said, you can do just about all of this using admin/people/permissions. Look under Node section.

For a more detail workflow solution, take a look at Workbench and its submodules like Workbench Moderation.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top