eZ Community » Forums » Developer » user who moved object to trash? (or...
expandshrink

user who moved object to trash? (or time of removal)

user who moved object to trash? (or time of removal)

Monday 02 May 2011 12:22:05 pm - 5 replies

is there a way to determine the user who moved (deleted) a node/object to the trash, either through the admin interface or database?

is the date/time of removal tracked?

Monday 02 May 2011 12:31:47 pm

Take a look to audit.ini , you'll find the solution! After enabling it you just need to access the var/log/audit file.

Thursday 20 October 2011 2:31:00 am

But if we need acces from eZ for programming verifications?

Thursday 20 October 2011 4:19:37 am

Hello Ruben,

You could write a php class to parse the audit log file content for your use / needs. I don't think I've heard of such a thing in the community, at least publicly (yet!) ...

I really don't think that eZ Publish stores any information in the database regarding the datetime a node/object is removed (and/or placed into the trash), who did it or anything like your thinking of (dreaming/wishing for beyond audit logs).

I hope this helps ...

Edit: I did have one idea, it's a little bit more involved. But you could create a kernel class override extension based on the original eZAudit class (this takes only a few minutes to setup. You would base it off the default class in the kernel).

Within the eZAudit class you could patch the writeAudit method to catch the audit log write requests for the various auditable actions you want to have logged within a database.

This would prolly require you implementing your own persistent object to store the data within the database.

http://ezpedia.org/ez/persistent_object

http://pubsvn.ez.no/doxygen/trunk/html/classeZPersistentObject.html

Here is a simple example of a persistent object in action (from a great extension), http://svn.projects.ez.no/nxc_string/datatypes/nxcstring/limitation.php

Here is an example persistent object in action (with a datetimestamp for start/end date) from ezsystems, https://github.com/ezsystems/ezxmlexport/blob/master/classes/persistenobjects/ezxmlexportexports.php#L44

 

Cheers,

Heath

Modified on Thursday 20 October 2011 4:48:37 am by // Heath

Thursday 20 October 2011 4:42:56 am

 

Thanks very much Heath, il will try ...

 

Best regards

 Ruben

Thursday 20 October 2011 6:57:10 am

Hello Ruben,

Great to hear! Let us know your results if you would it might help others if you shared your solutions as well.

Here is the original feature documentation for the audit features it's worth a read, https://github.com/ezsystems/ezpublish/blob/master/doc/features/3.9/audit_trailing.txt

Also here are some other similarly helpful threads on this topic,

http://share.ez.no/forums/general/sitewide-audit-trail (downloads for the ez.no items are still able to be found on projects.ez.no fyi, just search for them)

Note: The audit feature does not include logging for all events possible in the system, many others can be logged by a custom workflow event(s) using default and optional triggers for things like modification, creation, publication, etc. I recommend still using the same ezaudit writeAudit calls in the workflow events (working further with the kernel override ezaudit class) 

I hope this helps ...

Cheers,

Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from