feat: add personal data export script#3353
Draft
carlinmack wants to merge 2 commits into
Draft
Conversation
Contributor
|
This PR was automatically marked as stale. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For inveniosoftware/product-rdm#240
This is a draft PR to share a script to create a data export of user data, relevant to GDPR in Europe or OC11 at CERN. It also is useful as an example of how to access different parts of InvenioRDM programmatically via the service methods
The output of the script has the following structure:
If this is to be used to provide an export for real users, the output must be checked to ensure that it contains the sufficient and necessary data relevant for your instance. For example, if you have custom fields or functionality, whether designed to be public or internal, you should ensure whether they are exposed or hidden correctly. As much as possible I have used the
user_identity, however in some places thesystem_identityhas had to be used, especially for exporting deleted records and communities.Both yaml and json can be used for the output format, but we have chosen yaml as the default as it is more human readable.
There are some TODOs noted in the code for future work (mostly to do with getting more than 10k results from OpenSearch/ElasticSearch), and ideally this will be integrated: First into the admin panel, and then into the users settings page.