16 Jan 2009 22:59
Tombstoning in logs
OGo does not records the deletion of an object in the logs (table: log).
When an object is deleted it removes all the logs for the object, which
is sensible, but leaves no marker indicating the deletion. This is
problematic for figuring out where a contact went as well as for any
kind of auditing. In the past we've used a solution that simply created
a delete trigger on the DB, this has surfaced on the list now an then.
But that method cannot capture the "who" part of the delete operation
(as in who did the delete). Would it be acceptable to create a
tombstone entry for an object in the logs? After deleting the objects
logs.
Like:
<patch>
/* delete links */
[[_context linkManager] deleteLinksTo:(id)[[self object] globalID]
type:nil];
[[_context linkManager] deleteLinksFrom:(id)[[self object] globalID]
type:nil];
LSRunCommandV(_context, <at> "object", <at> "remove-logs",
<at> "object", [self object], nil);
+ LSRunCommandV(_context, <at> "object", <at> "add-log",
+ <at> "logText" , <at> "Company deleted",
+ <at> "action" , <at> "delete",
+ <at> "objectToLog", [self object],
+ nil);
[super _executeInContext:_context];
(Continue reading)
RSS Feed