cozy-data-system icon indicating copy to clipboard operation
cozy-data-system copied to clipboard

Creation of a sharing controller

Open paultranvan opened this issue 9 years ago • 4 comments

In order to implement the cozy-to-cozy sharing, we need to create a sharing controller. As a first iteration, this controller could be conceptually split in 3 parts :

  • Creation (sharing creator) : creates a Sharing document including the sharing metadata (recipient urls, description, docids, etc), and sends a sharing proposition for each recipient (could be considered as a Cozy notification).
  • Validation (sharing recipient) : called when a recipient accepts or denies a sharing proposition. If accepted, it creates a new Access document for this sharing. The answer and the credentials (if any) are sent to the sharing creator.
  • Answer (sharing creator) : depending on the recipient's answer, saves the credentials and triggers a CouchDB replication, or removes the recipient from the Sharing document.

paultranvan avatar Feb 16 '16 16:02 paultranvan

Maybe, it's better to call it 'sharing service' instead of 'sharing controller', as controller has a specific meaning in cozy.

nono avatar Feb 17 '16 10:02 nono

I think @Gara64 talks about Express/Americano controllers.

frankrousseau avatar Feb 17 '16 17:02 frankrousseau

But on the architectural point of view, we could include it as a service like we talked for files.

frankrousseau avatar Feb 17 '16 17:02 frankrousseau

Yes, I meant an Americano controller, but this could indeed be viewed as a service.

paultranvan avatar Feb 18 '16 16:02 paultranvan