Allow designated users to remove other user's drafts

Author Message

James Robertson

Wednesday 31 August 2005 4:31:29 pm

Within some of the eZ publish sites we administer, some users (accidentally) create draft objects which then remain in the system for a long time. It would be nice to be able to allow other users (ie. Admin.) to be able to delete their (very old) draft objects.

Or possibly have an automated system for this, whereby draft object that are older than say a month are deleted. This should be applied especially if there are no chnages between the draft object and the version it was based on.

Kristof Coomans

Thursday 01 September 2005 12:49:19 am

Currently it is not possible to know on which version a draft was based. Creating a new draft copies the content of the published version, but another draft can be published afterwards.

It would be usefull to add a new field to the ezcontentobject_version table which contains the version it was based on. A cronjob could then loop over the drafts, check all the version's attributes on differences in data_int, data_float and data_text, and the version's related objects. If there are no differences, the draft can be removed.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 00:40:12
Script start
Timing: Jan 31 2025 00:40:12
Module start 'layout'
Timing: Jan 31 2025 00:40:12
Module start 'content'
Timing: Jan 31 2025 00:40:12
Module end 'content'
Timing: Jan 31 2025 00:40:12
Script end

Main resources:

Total runtime0.0202 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.3750151.2422
Module start 'layout' 0.00440.0034 739.6172220.7344
Module start 'content' 0.00770.0109 960.3516997.7266
Module end 'content' 0.01870.0015 1,958.078129.9922
Script end 0.0202  1,988.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.7125140.0002
Check MTime0.00115.3967140.0001
Mysql Total
Database connection0.00062.941210.0006
Mysqli_queries0.00199.361130.0006
Looping result0.00000.040110.0000
Template Total0.00115.510.0011
Template load0.00094.290910.0009
Template processing0.00021.227210.0002
Override
Cache load0.00062.987210.0006
General
dbfile0.00031.325080.0000
String conversion0.00000.025940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs