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..
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | workflow.jpg | 103.86 KB | gupta.sandeepcs |
| #13 | workflow1.jpg | 106.3 KB | gupta.sandeepcs |
| #10 | revision.jpg | 84.36 KB | gupta.sandeepcs |
| #8 | revision.jpg | 79.5 KB | gupta.sandeepcs |
Comments
Comment #1
gupta.sandeepcs commentedcan anybody reply?
Comment #2
gupta.sandeepcs commentedcan anyone reply?
Comment #3
dddave commentedMmmh, 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.
Comment #4
rdeboerThanks 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?
Comment #5
gupta.sandeepcs commentedI 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.
Comment #6
rdeboerOk, I'll look into it.
Comment #7
gupta.sandeepcs commentedthanks RdeBoer..
Comment #8
gupta.sandeepcs commentedThe image shows the the page.it contains the link "Delete both revision". so by pressing this the user can delete both revisions.
Comment #9
rdeboerGupta,
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
Comment #10
gupta.sandeepcs commentedRdeBoer
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.
Comment #11
rdeboerThanks 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?
Comment #12
gupta.sandeepcs commentedThanks 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.
Comment #13
gupta.sandeepcs commentedComment #14
rdeboerHi 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.
Comment #15
gupta.sandeepcs commentedThanks 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.
Comment #16
rdeboerI 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?
Comment #17
gupta.sandeepcs commentedThanks 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?
Comment #18
gupta.sandeepcs commentedHey 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.
Comment #19
eriktoyra commentedSubscribing. 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.
Comment #20
rdeboer@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...
Comment #21
eriktoyra commented@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.
Comment #22
eriktoyra commented@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?
Comment #23
jmerandy commentedI 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!
Comment #24
rdeboerI 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!
Comment #25
gupta.sandeepcs commentedWell i was using the
Revisioning 6.x-3.5
Workflow 6.x-1.4
Module Grants 6.x-3.5
and facing the problem
Comment #26
gupta.sandeepcs commentedHi,
Well Delete All Revisions button is related to module grants module not revisioning module.
Comment #27
gupta.sandeepcs commentedThe problem still exist even for the updated modules.
Comment #28
whitespirit commentedHello, any solution ?
Comment #29
pgillis commentedAre 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
Comment #30
rdeboerThanks, useful to know! We need reproducable test cases.
Comment #31
gupta.sandeepcs commentedwell 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
Comment #32
rdeboerHi 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
Comment #33
gupta.sandeepcs commentedHi 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.
Comment #34
gupta.sandeepcs commentedAnd 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
Comment #35
rdeboerHi 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
Comment #36
gupta.sandeepcs commentedThanks RdeBoer..
I hope we will get the solution soon
Comment #37
rdeboerNo activity for nearly a year. Has this request gone away?
Comment #38
gupta.sandeepcs commentedHAs this issue been solved?
Comment #39
rdeboerThere 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.