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

Comments

rdeboer’s picture

This 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

blaiz’s picture

Thanks 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.

rdeboer’s picture

Version: 6.x-3.9 » 6.x-3.11
Assigned: Unassigned » rdeboer
Category: support » feature

I'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!

cluther’s picture

What about Content Access? ( http://drupal.org/project/content_access ).

robbm’s picture

Just 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.

johnpitcairn’s picture

+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.

DaPooch’s picture

+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?

rdeboer’s picture

I can feel myself starting to bow to community pressure...

acbramley’s picture

+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.

acbramley’s picture

StatusFileSize
new1.86 KB

I'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

rdeboer’s picture

#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

acbramley’s picture

StatusFileSize
new1.86 KB

Yeah after testing a bit today I rerolled with $node->revision_uid instead of $node->uid. This seems to be more robust.

rdeboer’s picture

@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..

halcyonCorsair’s picture

Status: Active » Reviewed & tested by the community

Works for me.

acbramley’s picture

StatusFileSize
new1.88 KB

After more testing I realised that the if statement was still a bit buggy. This should work in all cases :)

rdeboer’s picture

Thanks Zombienaute. From what I can see this latest patch looks perfect.

rdeboer’s picture

Will apply in the next few days.

blaiz’s picture

Awesome! Thanks.

rdeboer’s picture

Just a note to myself to apply patch and check it in.

rdeboer’s picture

Status: Reviewed & tested by the community » Fixed

Applied 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.