The basic use case of a content management system where contents need to be validated before they are being published is being implemented in the Revisioning module. Obviously, the module offers much more fonctionnalities than that but for this tutorial, I will stick to the following use case described on their project's website:
Authors write content that prior to being made publicly visible must be reviewed (and possibly edited) by moderators. Once the moderators have published the content, authors should be prevented from modifying it while “live”, but they should be able to submit new revisions to their moderators.
Here are the step-by-step instructions of how to install and setup the Revisioning module.
Install Revisioning, Module Grants and Smart menus Smart tabs modules
- Download Revisioning, Module Grants and Smart menus Smart tabs.
- Decompress them into .../sites/all/modules directory.
- Go to Administer->Modules, enable Module Grants, Module Grants Monitor and Revisioning
- Click on the Save configuration button and then the Continue button.
Setup the content type
We will use Story as our content type.
- Go to Administer->Content types, click on the Edit link of the Story.
- Under the Workflow settings, uncheck Published. Check Promoted to front page, Create new revision and New revision in draft, pending moderation (requires "Create new revision").
- Click on the Save content type button.
Create Author and Moderator roles and assign permissions to them
- Go to Administer->Roles, add the following 2 roles: Author and Moderator.
- Go to Administer->Permissions, enable the following permissions for Author and Moderator.
| Permission |
Author |
Moderator |
| access All tab |
X |
X |
| access I Can Edit tab |
|
X |
| access I Can View tab |
|
X |
| access I Created tab |
X |
X |
| access I Last Modified tab |
|
X |
| access Published tab |
|
X |
| access Unpublished tab |
|
X |
| |
|
|
| access content |
X |
X |
| create story content |
X |
|
| edit any story content |
|
X |
| edit own story content |
X |
|
| revert revisions |
|
X |
| view revisions |
|
X |
| |
|
|
| access Pending tab |
X |
X |
| edit revisions |
X |
X |
| publish revisions |
|
X |
| unpublish current revision |
|
X |
| view revision status messages |
|
X |
| view revisions of own story content |
X |
|
Test the workflow
- Go to Administer->Users, create an Author user and a Moderator user.
- Login as an Author and post a Story. The story posted will not be published. It is now up to the Moderator to review and publish the story.
- Login as a Moderator. Go to Accessible content->I can edit->Unpublished. Click on the Story's title.
- Click on Revisions->Publish->Publish to publish the story.
- Go to the homepage, the story posted is now published.
- Login as an Author and edit the posted story. Go the homepage, the changes are not shown. The moderator has to approve it again for the changes to show.