-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Automaticaly set imported element userModification #418
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @root913,
your PR looks good to me! Just some minor changes. I would always rather import the whole class instead of importing just a part like with Tool\Admin.
Also I would add a comment saying that the 0 is system user just to have it there.
But other than that it looks solid!
Thank you for your contribution!
I noticed that latest migration is specified in Installer class (method: getLastMigrationVersionClassName) - should i update it also? |
That would be awesome yeah! |
Co-authored-by: Matthias Schuhmayer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@root913 Thank you for all the changes and your contribution! This looks good to me!
This PR solves problem of identifying who is the author of object change for manualy triggered imports.
As of now every object that was changed by import had userModification set to 0 (that is system user).
This change introduce new column "userOwner" to queue table that by default is set to 0.
If user manualy trigger import it's user id is passed to queue item and later in import process it is set to element userModification property.
This will not affect automatic/cron imports.