Hi all,
i have created a workflow. In my workflow there are 3 stages.. draft->review->live.
i have given the author to delete the content in draft stage and whenever the the author wants to edit the published content in live stage, he has to take the content from live to draft stage and thus can edit and creates a new revision.
The problem here is that when the author edit the live content by moving the content from live->draft stage, he gets the link of "Delete all revisions". Now by clicking on this link the author can delete all the revision including the published one..
So in my view this is the bug as the author should not be able to delete the published content..
I have not given any delete permission under node module.
So its a serious bug..
Please look at the bug..

Comments

gupta.sandeepcs’s picture

can anybody reply?

gupta.sandeepcs’s picture

can anyone reply?

dddave’s picture

Project: Drupal core » Revisioning
Version: 6.15 » 6.x-3.4
Component: other » Miscellaneous
Assigned: gupta.sandeepcs » Unassigned
Priority: Critical » Normal

Mmmh, this seems like a feature provided by Revisioning. So this should be discussed there, shouldn't it?

In addition: By assigning an issue to yourself, you show that YOU are working on a solution (providing a patch for example). Feel free to correct the tags.

rdeboer’s picture

Thanks for handballing this to me dddave!

@gupta.sandeepcs: not sure which version of Revisioning you were using, or in fact whether you were using it at all.
Can you please upgrade to the latest version (and also upgrade Module Grants to the latest) and report whether the issue persists?

gupta.sandeepcs’s picture

I am using the latest versions of both the modules. and still facing the problem.it's the serious bug. How can the creator able to get the option of deleting the live content?Though we have not given any delete permission.

rdeboer’s picture

Ok, I'll look into it.

gupta.sandeepcs’s picture

thanks RdeBoer..

gupta.sandeepcs’s picture

StatusFileSize
new79.5 KB

The image shows the the page.it contains the link "Delete both revision". so by pressing this the user can delete both revisions.

rdeboer’s picture

Gupta,
I have researched this a bit more and it occurred to me that in Drupal, if the user is user 1 OR has the administer nodes permission, they can do ALL operations (view, update, delete) on ALL nodes.
Have you made sure to switch this permission off for the account that is logged in when you observe this behaviour?
See also the Revisioning tutorial, point 7.
Rik

gupta.sandeepcs’s picture

StatusFileSize
new84.36 KB

RdeBoer
I have not given any administer permission in node.the creator has neither edit or delete permission under node section. i think the problem is with the revisioning and module_grants module.
I am attaching an image for ur refernce.

rdeboer’s picture

Thanks for the screenshot Gupta,
Apart from Module Grants, are you using any other modules that may affect content access?
From you introduction it seems you're using the Workflow module, is that correct? Any others? Taxonomy Access Control or TAC-Lite ?
What workflow permissions have you set up there for the role that should not see the "Delete all revisions" link? Another screenshot would be great.
What happens when you disable Module Grants, leaving Revisioning enabled?

gupta.sandeepcs’s picture

Thanks for the reply. i am using basically three modules
1.Workflow
2.Revisioning
3.Module_grants
Disabling the module grants module does not fix the problem as the "Delete all revisions" link still shows.
I have given the delete permission to author in draft stage as the author should be able to delete in draft stage. But if the content is live and author wants to edit it, he has to bring back it to draft stage and then edit it to make a new revision of the existing live content and now the workflow should again follow.
I am having the problem of why this "Delete all Revisions" is showing to the author as this gives him the permisison fo deleting the live version as well.

gupta.sandeepcs’s picture

StatusFileSize
new106.3 KB
new103.86 KB
rdeboer’s picture

Category: bug » support

Hi Gupta,
Now that you've confirmed you use the Workflow module, I believe the issue comes down to this. The Workflow module has node-granularity, it is not aware of revisions. Therefore any permissions you assign to a role+state combination are with respect to the node as a whole.
There is little that Revisioning can do about that.
How about unticking the Workflow delete permission and ticking the "delete own content" permission (node section) for the author instead? This will also be a compromise though, as the node section permissions do not know about Worklfow, so will apply across all Workflow states, ie. the author will be able to delete their content at any point.
Alternatively do not grant any delete permissions at all to authors. This means while content may be unpublished and thus hidden from the public eye, it cannot be deleted from the database (at least not by authors), so that your site automatically keeps a full "audit trail" of all content ever created. This is not uncommon in many a company.

gupta.sandeepcs’s picture

Thanks for the reply my friend. Well it seems i need to compromise on this issue..
Can't they fix this issue? Don't u think this is a bug? Because an ideal workflow should work as i described.

rdeboer’s picture

I share your frustration... I was surprised I had to develop Revisioning because there didn't seem to be a comprehensive (let alone ideal) solution for publication workflows in this system that calls itself a CMS....
The Workflow module was not developed at the same time as Revisioning, so that's why the pairing-up of the two modules is less than perfect....
The benefit of hind-sight is always 20/20 isn't it.... ?
But Drupal is still pretty awesome, don't you think?

gupta.sandeepcs’s picture

Thanks RdeBoer, you are quite helpful. Well Drupal is quite useful. But i think since this is a major issue, this issue should have been looked into quite early by the community members as this is for me quite a big bug. can't this be fixed in the upcoming releases of workflow and revisioning module because sooner or later other people will be facing this issue too.What do u say?

gupta.sandeepcs’s picture

Hey RdeBoer, i have looked into the code of Revisioning module and i can handle the Delete all revision link but i am not able to handle the "Delete all Revisions" button that shows on the editing form. I have find out that this comes from module grants module. the code line is module_grants/node tools/node_tools.module line number 90.
function node_tools_form_alter(&$form, &$form_state, $form_id) {
if (isset($form['#id']) && $form['#id'] == 'node-form') {
$nid = $form['#node']->nid;
if (!isset($form['buttons']['delete']) && node_tools_get_number_of_revisions($nid) > 1) {
// Special treatment for Delete button when there's multiple revisions.
// Make it obvious to the user that a 'Delete' is in fact 'Delete all'.
$form['buttons']['delete']['#value'] = t('Delete all revisions');
}
}
}
Can u handle it. I just want to remove this delete button from the editing form.

eriktoyra’s picture

Subscribing. I'm having the same problem. Regardless of how I change the configuration, the "Delete all revisions" is shown for all users who can edit book pages.

Installed modules: Workflow 6.x-1.3, Revisioning 6.x-3.4, Module grants 6.x-3.4. (I know, I should upgrade all three to the lastest versions. I will do this during this week.)

I have the following configuration setup:
Workflow: No users are allowed to delete revisions in any state.
Module grants: "Interpret absence of access grants as a "don't care", rather than a "deny access" enabled, other settings disabled.
Drupal permissions: Permissions "delete any book content", "delete own book content" and "delete revisions" = disabled for all users.

If this is a Revisioning issue I don't know. It seems more like a Module grants issue to me.

rdeboer’s picture

Status: Active » Postponed (maintainer needs more info)

@eriktoryra, #19:
Your specification of the Drupal permissions isn't 100% clear to me. Are you saying that all three ("delete any book content", "delete own book content" AND "delete revisions") are disabled? And that with all three disabled the "Delete all revisions" button is still visible? If so, I just tried that (Revisioning 6.x-3.8 though) and I cannot reproduce your issue... It all works fine for me...

eriktoyra’s picture

@RdeBoer: Yes, that is correct. All three of those are disabled for me. I will upgrade to the latest versions of the modules today and then get back to you.

eriktoyra’s picture

@RdeBoer: I have just updated the modules to the latest ones available without doing any configuration changes to the modules. The "Delete all revisions" button doesn't show up after the update. So, this seems to be an issue with the older releases.

I have updated the following modules:

Workflow
Upgraded from 6.x-1.3 to 6.x-1.4.
Revisioning
Upgraded from 6.x-3.4 to 6.x-3.9.
Module grants
Upgraded from 6.x-3.4 to 6.x-3.5.

@gupta.sandeepcs: Could you confirm which versions of Workflow, Revisioning and Module Grants you're using?

jmerandy’s picture

Version: 6.x-3.4 » 6.x-3.9

I have this same problem and have the most up-to-date versions of the three modules (revision, work flow, module grants) that are recommended for work flow. The author role I created, which I wish to give limited control to, is presented with an option to "delete all revisions." There is no way to assure that my users will not accidentally hit this button and the repercussions are pretty dramatic if the revision deleted is a page with important content, or, even more devastating, when that page is tied into the primary menu as a parent item and all of the items below it are promoted to top-level primary menus!

rdeboer’s picture

I don't know.... are you sure you haven't given the author the "delete own|any page content" permission? That's where the "Delete all revisions" button comes from, because you're deleting the entire node .... with all its revisions.
That "Delete all revisions" button is not related to the "delete revisions" permission. That's for individual revisions (but requires "delete own|any page content").
Confused? Tell the guys who wrote D6 core!

gupta.sandeepcs’s picture

Well i was using the

Revisioning 6.x-3.5
Workflow 6.x-1.4
Module Grants 6.x-3.5

and facing the problem

gupta.sandeepcs’s picture

Hi,
Well Delete All Revisions button is related to module grants module not revisioning module.

gupta.sandeepcs’s picture

The problem still exist even for the updated modules.

whitespirit’s picture

Hello, any solution ?

pgillis’s picture

Are any of you using og as well? I am seeing this problem related to "admins" of the group. I will look there for more, but thought I would mention in case some are overlooking it

rdeboer’s picture

Thanks, useful to know! We need reproducable test cases.

gupta.sandeepcs’s picture

well i have not found any solution yet.I raised this bug way back in jan-feb but still there is no solution of the problem

rdeboer’s picture

Hi Gupta,

Your screenshots attached to #13 show that you have given the author role permission to "Delete in draft state".
From core and Workflow's point of view "Delete" means "Delete the node" or in other words "Delete all revisions" (which is just a re-labelling of the "Delete" button to make it extra clear that you're deleting all revisions not just one).

As strange as it may sound to you, it is impossible to give someone the right to delete a single revision without also giving them the right to delete the entire node, i.e. all revisions.
In other words "delete ... .content" permission is a pre-requisite for the "delete revisions" permission.

As a workaround I suggested in #14 to not grant any delete permissions at all to authors. This means while content may be unpublished and thus hidden from the public eye, it cannot be deleted from the database (at least not by authors), so that your site automatically keeps a full "audit trail" of all content ever created.

Rik

gupta.sandeepcs’s picture

Hi RdeBoer,

But if you we don't provide delete permission in draft stage, it means we are forcing the author to create the right content every time because if the author creates the wrong content he is not authorised to delete it. Logically the author should have the permission to delete the content in draft stage otherwise there is no use of this module as it is adding additional checks on our concept of workflow.
If the user is not able to delete the content in draft it simply means he can't even test the content he is creating as wrong content will not be deleted by him and the site admin will be hugely engaged in the deleting of these content i.e adding the extra work to site admin.

gupta.sandeepcs’s picture

And i dont think there is too much effort in deleting the particular revision of a node as we just want to delete the content from node_revision table and it can be done easily if properly think

rdeboer’s picture

Hi Gupta,
I agree with you and your wishes -- I was merely stating that in terms of coding this, we'd have to "work around" what core normally does.
A further complication is that for historic reasons the Workflow module is NODE-based, while Revisioning is REVISION-based.
I'll give it some more thought and will get back to this thread later....
Rik

gupta.sandeepcs’s picture

Thanks RdeBoer..
I hope we will get the solution soon

rdeboer’s picture

Status: Postponed (maintainer needs more info) » Postponed

No activity for nearly a year. Has this request gone away?

gupta.sandeepcs’s picture

HAs this issue been solved?

rdeboer’s picture

Status: Postponed » Closed (cannot reproduce)

There has been no activity here for a year and a half and Revisioning has since progressed to version 6.x-3.13 (with 6.x-3.14 about to be released).
Closing.
If there is still a problem, then please open a new issue, clearly stating steps to reproduce.