I want to give a role the possibility to create new articles and save them as unpublished. Only the administrators can save articles as unpublished, and I want to give this possibility to another role. How can I do that?

I only have Save and publish for the other roles.


Looking around, it would appear that users with the Administer Content permissions can do what you want to accomplish. However, this permission has the following warning: Give to trusted roles only; this permission has security implications. Promote, change ownership, edit revisions, and perform other tasks across all content types. If this is a limited permission that you want to give and to trusted users only (as suggested by the warning provided by Drupal), you should be fine.

However, if you want many (possibly untrusted) users to be able to do this, the best suggestion I have at the moment is to add a field to the node itself asking the user if they want it to be published or not and to write a hook that checks the value of that field and publishes it based on that information. There are many variations of this - you can make the field appear only for certain roles, etc.

Edit: Another option you have, instead of writing a hook, is to use the Workflow module. You can set various access permissions from within the module itself to replicate published/unpublished behavior (i.e. make it so that only the author can see nodes published under a certain workflow state). This is probably a better option in the long run since these can be saved in configuration. I'm sure there are other benefits as well.

  • Thank you, i'll take a look at workflow and tell you if it works. – usethe23 Feb 1 '17 at 12:02

You can do this with override_node_options

When installed it will give you Override CONTENT TYPE published option for each content type.

NOTE this problem is a Drupal 8 shortcoming which is also part of this issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.