Foundational work for publishing a (Corpus) Node
Fixes #400. This is a beefy MR which deserves some explanation on how it works.
Demo GIF first
How it works
Me and Alexandre discussed a bit on which design to go for, and decided to pick the easiest design we could think of. Therefore, there a bunch of points worth discussing:
- In order to publish a node, users must explicitly move it into their
Public
folder. This generates under the hood a soft link (to use a filesystem terminology), so that the node is visible in theirPublic
directory as well as any otherPublic
folders for any logged-in user; - Only the owner of the node can publish it (i.e. the logged-in user which
user_id
matches the one stored in the DB node); - A published node (in the current implementation) can still be modified (by the original owner) after publication;
- Only the publisher can modify (i.e. edit/delete/move etc) a published node.
- Every single children under a published node will be published as well, so one has to be careful about what gets shared.