Comments (12)
@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.
What's the purpose of having the original data there for you?
from audit-stash.
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.
@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.
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.
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.
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.
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.
I'm willing to accept pull requests for this
from audit-stash.
+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.
@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.
Seems like PR was merged.
from audit-stash.
Related Issues (20)
- deprecation warning for ServerRequest::here() HOT 3
- Deprecated field type error when running elastic_mapping shell HOT 2
- Multiple index guide incorrect HOT 3
- Throws an SQL incorrect syntax error on test HOT 2
- Inserting stringifiable objects HOT 2
- Implement JSON field types HOT 3
- CakePHP 4 compatibility HOT 5
- Can't find %s in the configuration guide for daily index HOT 1
- psr-4 autoloading standard warning in composer 1.10 HOT 2
- AuditLogsType.php does not comply with psr-4 autoloading standard. HOT 2
- String datetime changes may break custom DateTimeType implementations HOT 1
- Log associative model HOT 4
- Logging Cascading Deletes HOT 1
- Rename AuditLogsType.php file to AuditLogsIndex.php
- Your requirements could not be resolved to an installable set of packages
- Tests fail on my local
- CakePHP 5 Support HOT 4
- Update test coverage integration HOT 1
- Add PHPCS to pipeline
- Update build bage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audit-stash.