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
UnpublisherID in version History #3746
Comments
You can extend the Versioned object for this purpose, add the Unpublisher as a Member relationship, and hook in to onBeforeVersionedPublish to assign it. |
Perhaps a less explicit way (and saving adding a column only for the unpublish event) would be to save a record for unplubish but use the PublisherID as the implied unpublisher? I see that would have a more wide reaching usefulness |
Thanks Will & Daniel, We cannot know who unpublished the page or deleted. It necessary to track malicious user trying to unpublish the page. I'm not sure whether it's right but what I found that onBeforeVersionedPublish is called on publish or save draft. Instead it should create new version on deleteFromStage or on delete. Thanks |
You can access this through
You can also hook in to the https://github.com/silverstripe/silverstripe-framework/blob/3.1/model/Versioned.php#L1217 If you also read the source of DataObject.php, you can get an idea of some of the other extension points available to you. |
Feature request, can be implemented via extensions as described above |
Currently the Version History does not show who unpublished or deleted the page. Can we have the columns to save unpublisherID in the version history table
The text was updated successfully, but these errors were encountered: