Hello,
I did some research but it seems that it is current impossible with workflow. A traditional workflow with draft/review/final states and author/editor roles. However, I create an intermediate role: contributor, who can publish his own node. That means he can move a state from draft to final, but only for his own nodes.
Anyone knows how to have it done? I'm open to any suggestion.
Regards.
Comments
Comment #1
jcisio commentedThe only solution that I can see know is to duplicate the transition permission. Current permission is for any nodes, a new one is for own nodes.
Comment #2
Bastlynn commentedSince this request is over a year old, I'm going to assume a solution was found or you've moved on. If not, please get updated to the latest versions of all modules and make a request for it against Drupal 7 and I'll be glad to take a look at it.
Comment #3
jcisio commentedIt's not vital for us, but we still need it.
Comment #4
Encarte commentedSorry jcisio, but i don't understand what feature is being requested (maybe this is just a support request).
You want the "contributor, who can publish his own node" to be able to change the node state? Is that it? In workflow, the "contributor" who published "his own node" is the Author. So, you just need to set transition permissions for the author and he will be able to change the state of the nodes he created and only those ones.
If you want to give the user permissions to change any node state, just set the transition permissions for his user group and members of that group will be able to change any nodes regardless of being the author or not.
I hope this helps. I'm setting the issue as support and fixed, please set it back if I got it all wrong.
Comment #5
jcisio commentedThere is a mixture. For example, for a content type "article", I want:
- Any author can move the state from "draft" to "need review"
- Any author, who in addition has the "contributor" role, can move the state directly from "draft" to "final"
- Of course, I don't want "contributor" role to move others' articles from "draft" to "final".
Comment #6
Encarte commentedWhat you want is an AND operator to combine «Author» with other user roles on the transition permissions. I guess that wont be easy, but, indeed, it's a feature request...
Comment #7
jcisio commentedWhat you've just said is a great idea. I change the title to make it clear. We don't need Drupal role, we switch to "editorial role". Each editorial role is a combination (with AND and/or OR operators) of Drupal roles. In fact, the "author" role is already an exeption for what is not a Drupal role.
This could be useful for sites with a few dozens of roles but many of them are the same from an editorial aspect.
Comment #8
Encarte commentedThat would surely improve the UI: having a pre-set of «workflow roles» with AND and OR operators joining together several drupal user roles. You could even set a workflow role for user roles that don't play any part on that particular workflow and prevent them from appearing on the transition table (only a «no-part» column would appear). For sites with many user roles that would be great. Lets be clear: you cannot presently, with the current UI, have 30 user roles and a 30 states workflow, you would risk breaking your site or your browser. 20 x 20 is already very risky today. This idea could make that possible.
Comment #9
Bastlynn commentedLet's go ahead and bump this up to 7.x and backport once it's completed there. I know of at least one person who has approached me about cleaning up the UI for workflow, and this would be related to that. (In addition to an AND/OR feature set.)
Comment #10
nancydruThe UI has been cleaned up quite a bit. Someone want to tackle this now?
Comment #11
johnvAdding as a parent: #2144747: [META] Flexible transitions
Comment #12
johnvComment #13
johnvSince version 7.x-1.2, there is a new hook 'transition permitted'. Here you can allow/deny state changes.
You cannot set the default value. You cannot add transitions. (That would be a nice add-ons.)
The attached issue gives a solution in code.
Comment #14
johnvHi, I think you can do the things you need with the hook I added in this issue: #744272: Allow dynamic/flexible/freely definable transitions per state
In Admin UI you can set the general rules, and tweak them with the new hook.
Comment #15
johnv