Git Product home page Git Product logo

Comments (12)

kevinquinnyo avatar kevinquinnyo commented on May 27, 2024 1

@lorenzo that's a good point actually. It might still be a good idea to have it on the delete event in case the entity was originally seeded through migrations or otherwise not tracked by the behavior.

I might send a PR later if I think I still need it, thanks!

from audit-stash.

lorenzo avatar lorenzo commented on May 27, 2024

What's the purpose of having the original data there for you?

from audit-stash.

kevinquinnyo avatar kevinquinnyo commented on May 27, 2024

For my uses, our application is mostly used internally by company employees, and being able to track when an entity was deleted (perhaps carelessly or mistakenly) by an employee seems useful. I can however also see why someone would not care to track that.

from audit-stash.

lorenzo avatar lorenzo commented on May 27, 2024

@kevinquinnyo but this does track when the entity was deleted, doesn't it? Or you mean that you wanted to store the last known state of the entity before it gets deleted

from audit-stash.

kevinquinnyo avatar kevinquinnyo commented on May 27, 2024

Or you mean that you wanted to store the last known state of the entity before it gets deleted

Yes. I was thinking that the primary key of the record that was deleted date the record was deleted isn't too meaningful from the perspective of an audit trail, so it would be nice to see what data was there previously.

edit: still need more coffee, brain not working

from audit-stash.

lorenzo avatar lorenzo commented on May 27, 2024

You also get the primary key of the record. The way I use this internally is that I show all events per primary key. I can see a full history of changes from the moment it gets created to the moment it gets deleted.

I don't see a problem in having the original entity in the delete event, though. If you send a PR with tests I'll merge it

from audit-stash.

aceat64 avatar aceat64 commented on May 27, 2024

Having the deleted data would be useful for me, as most of my users just look through Kibana to see changes. This would save them some time for seeing what was deleted.

from audit-stash.

GeekWiinik avatar GeekWiinik commented on May 27, 2024

Hi.. very useful plugin, but as kevinquinnyo commented, it's useful to see what data was deleted and not only the primary key.. can you add this? I will try to add this functionality.. but if someone already did it.. please share..

from audit-stash.

lorenzo avatar lorenzo commented on May 27, 2024

I'm willing to accept pull requests for this

from audit-stash.

bmudda avatar bmudda commented on May 27, 2024

+1 Having the deleted entity captured would be helpful (for restoring entity in case of accidental deletion). @kevinquinnyo were you able to create a PR for this?

from audit-stash.

kevinquinnyo avatar kevinquinnyo commented on May 27, 2024

@bmudda @GeekWiinik @lorenzo I finally found a half hour today to try adding this. #35

The problem is making sure not to break backwards compatibility with the previous AuditDeleteEvent signature, and I don't think it's quite right. I can probably add some tests soon.

from audit-stash.

dereuromark avatar dereuromark commented on May 27, 2024

Seems like PR was merged.

from audit-stash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.