I want to enable certain roles to view revisions of certain content types. In core there is only one "view revisions" permission covering all content types, and as far as I can see the way it works is it displays the "revisions" tab only on nodes of content types that that user has the ability to edit. This may not be perfect, but does what I want. However, webform nodes are the one exception - they have the "revisions" tab showing to those users even though they don't have the ability to edit the actual webform node. They DO have the ability to view the node and complete the webform, but surely actually editing the node (and seeing revisions) is a different thing entirely?

The only way I can see round this is to disable "view revisions" for these users, which means they can't see the revisions tab on any nodes, which isn't what I want.

I'm using the Access Control module to restrict access to particular webform nodes but there isn't an option in that module to enable/disable "view revisions" per webform or for the whole "webform" content type.

Comments

quicksketch’s picture

Hm, Webform doesn't do anything to change the behavior of Revisions. I'm guessing your access control on webform nodes is causing the odd behavior you're seeing.

In core there is only one "view revisions" permission covering all content types, and as far as I can see the way it works is it displays the "revisions" tab only on nodes of content types that that user has the ability to edit.

This is not true. The "Revisions" tab is visible even if you don't have access to edit. What you may be seeing is that the "Revisions" tab is only visible if multiple revisions exist on a node. If there are no revisions, the tab is not shown.

thoughtcat’s picture

Cheers :) Yes, I was wondering exactly that, but I have checked on several nodes, all of which have had multiple revisions, and the "revisions" tab is only displaying on nodes that the user has permissions to edit. I'm sure you're right about the way "revisions" works, but the access control settings on all webforms don't allow anyone but admins to edit them. There is only one webform on the site currently and that is individually set to be non-viewable to anonymous users, but the editing permissions aren't affected.

Anyhow, I have managed to solve the problem by unticking the "Enable the Revisions page for this content type" box on the "Diff" tab of the "Webform" content type. The tab is no longer showing to authenticated users (who have no other roles) but I still see the tab when logged in as admin. This seems slightly odd but I guess the "view revisions" setting for admin users in /admin/people/permissions is overriding the setting on individual content types.

quicksketch’s picture

Status: Active » Closed (fixed)

Great, glad things have been sorted out.