Two different role

  • The first one who's content needs to be moderated by an other role to make its content published.
  • The second one who's content can be published directly

I simply can't find a way for doing this. If I set the "Bypass moderation restrictions" I still see its new content appear as a Draft and than it has to be set manually to published.

Would appreciate your help.

Comments

stevector’s picture

Status: Active » Closed (works as designed)

I suggest you give the first role permission to go from "draft" to "needs review." This role should not have permission to make things published.

The second role could transition from "draft" straight to "published."

Please re-open if I have misunderstood.

Anonymous’s picture

I have a similar situation (Rules is involved, though).

My solution is to add a rule, to set content to "published", if it's from a certain role and in the moment when it transits to "needs review".

@stevector, adding transitions for my understanding still means to transit manually and - in case of rules changing the content implicitely - is not possible, because the content status will flip back to "draft" or "needs review" automatically.

As an example, the rule would look like:

{ "rules_auto_publish" : {
    "LABEL" : "Automatically publish for mods and admins",
    "PLUGIN" : "reaction rule",
    "TAGS" : [ "moderation" ],
    "REQUIRES" : [ "rules", "workbench_moderation" ],
    "ON" : [ "workbench_moderation_after_moderation_transition" ],
    "IF" : [
      { "component_rules_util_user_is_moderator_or_admin" : { "user" : [ "site:current-user" ] } },
      { "contents_current_state" : { "node" : [ "node" ], "moderation_state" : "needs_review" } }
    ],
    "DO" : [
      { "workbench_moderation_set_state" : {
          "node" : [ "node" ],
          "moderation_state" : "published",
          "force_transition" : 1
        }
      }
    ]
  }
}

The rule invokes a conditional Rules component component_rules_util_user_is_moderator_or_admin to restrict it to mods and admins.

anybody’s picture

Category: Support request » Feature request
Issue summary: View changes
Status: Closed (works as designed) » Active

*reopening*:

I just found this issue because I was asking myself the same question as @k_zoltan. The permission "Bypass workbench moderation" can be understood that way that content created by a user with this permission is AUTOMATICALLY being published without further moderation.

Such a behaviour is for example implemented in modr8.module and makes a lot of sense to me. In most cases users with that permission don't need or want an extra step to publish their own content (bad workflow).

So I'll change this into a feature request to provide an option to auto-publish moderated content created by a user with the bypass permission.

Please think about it a bit.
Of course a workaround is possible using rules (in my case I used Rules Bonus to get the "user has permission" condition and check for the bypass permission, which is even a bit cleaner to me than to check for a role as described in #2.
Anyway I think an out-of-the-box solution is very very useful here. That way this permission really starts making sense to me.

Thanks a lot.

joachim’s picture

> The permission "Bypass workbench moderation" can be understood that way that content created by a user with this permission is AUTOMATICALLY being published without further moderation.

That is how I understood it too.

It would be really useful to have this functionality, possibly as a new permission. As a developer, I frequently make test edits to nodes that I want to see live immediately, and I keep forgetting to change the publication status when I save the form!

joachim’s picture

Title: How can I a role bypass moderation? » Add a permission to bypass moderation
Status: Active » Needs review
StatusFileSize
new1.41 KB

Here's a patch.

This saves an awful lot of clicking when editing test nodes during development!

Status: Needs review » Needs work
pbcelery’s picture

+ for feature request.

Our site "managers" and "editors" do not want to create drafts, then go through a second publish step. We use moderation so they can approve others' posts. Making them approve their own posts adds to the confusion adopting Drupal.

Did this patch really fail? It looks like a good solution.

joachim’s picture

I expect it's because some of the tests need to be tweaked to account for the new behaviour this patch adds.

anybody’s picture

Yes you're right. We need separate tests for this permission and the old tests have to be run for a user without this permission.

aseabrook’s picture

From a UX point of view, it makes sense to make this feature a part of Workbench Moderation. I want to apply this patch but I'd rather wait until this feature gets rolled out in the next release. Any chance of that happening?

Let me know if there is anything I can do to help.

Thanks

bbc’s picture

Patch #5 works well for me. Thanks!

plato1123’s picture

Just curious if this patch ever made it into a release?