Add permissions, modify how permissions are used, and allow editing of revisions without them becoming live

kepol - March 1, 2009 - 19:42
Project:Revision Moderation
Version:6.x-1.0-alpha1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

For my workflow, I need several changes to the revision moderation logic. Mainly:

1) I needed some roles to be able to have edit revision permission without having publish or revert revisions permission

2) I wanted to be able to edit a revision without it becoming the "live"/current version

I have a patch that:

1) creates new permissions: "edit revisions" and "publish revisions"

2) uses new revisions for the edit and publish revision pages and links

3) doesn't show "your change is in moderation" type message if the user has "publish revisions" or "revert revisions" permissions

4) doesn't make the revision the current/live one upon editing (only upon publishing)

Why? Because I wanted to get the revision moderation working with the workflow module. I'm using as follows:

1) editor creates content and, when ready, changes state from "draft" to "review"

2) reviewer reviews content and, when done, changes state from "review" to "approved"

3) admin changes content state from "approved" to "live" (this triggers a "publish action" - see issue I just created for adding this new action

4) for the next revision, admin changes content state from "live" to "draft" (this triggers the action: "Enable revision moderation on node" which will create a new revision)

5) the process repeats but this revision is in moderation until step #3

AttachmentSize
revision_moderation.module.patch6.08 KB

#1

mdupont - March 2, 2009 - 10:11
Status:active» needs review

Subscribing. This is exactly what I'm looking for. Being able to apply one's workflow to revisions is a huge plus.

#2

kepol - March 3, 2009 - 00:17

Note - make sure you uncheck the box:

Exempt administrators from revision moderation

under admin/settings/revision_moderation

so that users with "adminster nodes" perms will not cause the node edit to go live immediately (bypass moderation).

#3

mdupont - March 3, 2009 - 09:56
Status:needs review» needs work

Maybe I made a mistake, but I encountered a few problems with this patch. I activated the module, edited my content types to create new revisions and make them go into moderation by default. I created a user who is able to create content, but hasn't the administer nodes permission, neither view, edit, publish or delete revisions permissions.

  • If I create a new node or edit an existing node with this user, I get an "Access denied" error after clicking on "Save". Maybe a "View own revisions" permission would be useful
  • If I create a new node with this user, I get an "Access Denied" and the node is neither published (although the "Published" checkbox is ticked in the content type options) nor it appears in the list of pending revisions. So one (administrator) have to know the exact URL to access it and edit it. If it is edited, then it goes into revision moderation as expected. This is clearly a bug ; when a node is first created, either it's "first revision" should go into moderation, or it should follow its settings (in this case, to be published right away).
  • If I edit a node, the revision goes into moderation, and I can see that the new revision is not the "active" one, but still the entire node becomes invisible to visitors, as if it was unpublished, like when revision moderation isn't activated

Is someone able to reproduce these ? As I'm not using any Action, Rule or standard Workflow I think it comes from the patch (original Revision Moderation was working).

#4

kepol - March 4, 2009 - 23:59

I am not defaulting to "create new revision" on the content type and my users have edit revision permissions so I imagine it's one or both of these causing the problem. I will try creating a new user right now that doesn't have edit permissions perm and see what happens.

...

I just tried the following:

1) auth user with perms to create content only and create new revision unchecked for the module - I could create content - no errors
2) changed create new revision to checked - I could still create content
3) got access denied error when going to edit content
4) added edit own content perm for the auth user
5) edited content from #1 & #2 successfully
6) tried this with a content type that uses workflow and another one that doesn't

Sorry. Not sure how to reproduce.

#5

jbeall - March 19, 2009 - 18:43

Subscribing, this is what I'm looking for.

#6

RdeBoer - March 22, 2009 - 08:24

Hi all,
You may find this new module (plus its documentation and 3 step-by-step tutorials) useful: Revisioning.
Let me know how you went.

#7

mdupont - March 23, 2009 - 09:27

This seems to be exactly what we are looking for here :-) I'll take a look at it.

#8

kepol - April 6, 2009 - 02:48

I switched over from Revision Moderation to Revisioning. I still ended up creating a custom action to ease the Workflow+Revisioning process. The process is like:

1) creation > draft
2) draft > review
3) review > live which triggers my custom action that:
a) publishes current revision
b) creates new revision (as pending)
c) changes state back to draft

#9

jbeall - May 15, 2009 - 15:48

The revisioning module + module grants worked for us.

#10

ashiwebi - June 19, 2009 - 10:22

I have create new revisions option checked in my site but the problems is,during change of state author still able to edit the node.

Is it related to content revisioning or I missed some access control permission.

AttachmentSize
imp.PNG 41.52 KB
imp1.PNG 29.42 KB

#11

profjk - June 20, 2009 - 22:55

*subscribing*

#12

michael_kirk - August 4, 2009 - 23:07

subscribing. Hopefully we can apply this to drupal 5 as well.

 
 

Drupal is a registered trademark of Dries Buytaert.