Hi,
I was wondering if it is possible to set the publish permissions differently for each role depending on the content type. For example, I have a role named news writer, and I don't want them to be able to publish anything. I have a role named news moderator, and they are the ones responsible for publishing each news story. Then I have a role named page writer, and another one named page moderator, who publish pages.
I'd like to give permissions to some people in my organization to be page news moderator, and page writer but not page moderator, meaning they can write and publish news stories, they can write BUT NOT publish pages. Somebody else will publish the pages.
I've been searching and couldn't find any way to get this. On the permissions pages, there are different "edit revisions" and "view revisions" permissions per content types, but not "publish", so when I give the news moderator role to my users, since it has the "publish" role, they can also publish pages.
Is it possible to do that with the current version of Revisioning + Module Grants? If not, is it possible to replace the only "publish" permission with one "publish" permission per content type, just like the "edit" and "view" permissions?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 952616-publish-per-content-type-3.patch | 1.88 KB | acbramley |
| #12 | 952616-publish-per-content-type-2.patch | 1.86 KB | acbramley |
| #10 | 952616-publish-per-content-type.patch | 1.86 KB | acbramley |
Comments
Comment #1
rdeboerThis kind of seggragation of roles/permissions can be achieved by throwing the Workflow module into the mix.
Each content type would have its own workflow. The workflows themselves would be near-identical in the states and transitstions they comprise of, but would differ in the assoicated access permissions. Workflow access permissions can then be set per workflow , per workflow state and per workflow state transition.
See this tutorial: http://drupal.org/project/node/408052
Comment #2
blaiz commentedThanks for the answer.
However, it seems overly complicated for what I'm trying to do. Would it be possible just to have one "publish" permission per content type? I don't really understand why the "view" and "edit" permissions can be set for each content type, but not the "publish" permission.
Comment #3
rdeboerI'll consider it. Marking as a feature request.
By the way, core's "view revisions" permission applies across all content types too -- so in that sense it's consistent!
Comment #4
clutherWhat about Content Access? ( http://drupal.org/project/content_access ).
Comment #5
robbm commentedJust wanted to add my vote for this (and subscribe).
I need to use Workflow for some content types, but would rather not have to use it for all other content types. More granular publish permissions would allow this. Without them, I need to use Workflow for everything.
Comment #6
johnpitcairn commented+1 from me. In situations where a full blown Revisioning + Workflow setup is overkill, it would still be useful to have some control over publish/unpublish per content type.
If my current project goes the way I think it might, I'll look at a patch.
Comment #7
DaPooch commented+1 also, having more fine grained publishing permissions on a per-content type basis would be AWESOME! It would basically allow our moderators to spread the responsibility of moderating without giving too much control. Since you've already got the view permissioning broken out on a per-content type basis would it be much harder to add Publishing rights per content type?
Comment #8
rdeboerI can feel myself starting to bow to community pressure...
Comment #9
acbramley commented+1 from me too. We need this functionality in the intranet we are building but no other modules provide this with support to revisioning. We also can't use the Workflow module as we use our own custom workflow.
Comment #10
acbramley commentedI've taken a stab at implementing this and it seems to work as expected with minimal testing. Would be keen to see this get tested by some more people and get more feedback on it.
Cheers,
Adam
Comment #11
rdeboer#10:
Thanks for the patch Zombenaute!
I think the logic in #395 needs to be refined a bit and I'll have to double check the final lines of the patch, but don't have development environment with me at the moment.
Will check tomorrow.
Rik
Comment #12
acbramley commentedYeah after testing a bit today I rerolled with $node->revision_uid instead of $node->uid. This seems to be more robust.
Comment #13
rdeboer@Zombienaute, #12
Thank you!
I ran out of time today and am attending the Drupal user group in Melbourne tonight, so maybe tomorrow...
Will probably port this to D7 too..
Comment #14
halcyonCorsair commentedWorks for me.
Comment #15
acbramley commentedAfter more testing I realised that the if statement was still a bit buggy. This should work in all cases :)
Comment #16
rdeboerThanks Zombienaute. From what I can see this latest patch looks perfect.
Comment #17
rdeboerWill apply in the next few days.
Comment #18
blaiz commentedAwesome! Thanks.
Comment #19
rdeboerJust a note to myself to apply patch and check it in.
Comment #20
rdeboerApplied with minor mods to Git repository 6.x-3.x branch. Will be available in 6.x-3.13
Will also apply to 7.x (master) branch. Available in 7.x-1.2