[Node Corpus] Purge orphans documents/contexts - while a corpus is deleted - Important for GDPR (fr: RGPD)
Summary
On deleting a Corpus node, the documents (contexts) are not automatically deleted.
This raises a problem with GDPR and possibility for users to delete their own data.
IMPORTANT:
- we have to conserve the contexts if they are linked to another Corpus in the tree
- so only orphan contexts must be deleted
Steps to reproduce
What is the current bug behavior?
Actually the database conserve all contexts (event orphan ones).
What is the expected correct behavior?
Previously described.