cozy / cozy-doctypes

The doctypes used in cozy-stack
https://docs.cozy.io/en/cozy-doctypes/docs/
GNU Affero General Public License v3.0
2 stars 29 forks source link

Add terms doctype #70

Closed CPatchane closed 5 years ago

CPatchane commented 5 years ago

Will be used by the Store to save the accepted terms on application install (if the application has terms)

CPatchane commented 5 years ago

Bien vu @edas je n'avais pas pensé à l'isolation ici et je n'avais le contexte sur les droits nécessaires pour forcer un _id. Du coup je suis du même avis de passer par de simple documents indéxés. Je vais modifier ça 👍 Mais ça ne changera rien au fait qu'un app pourra demander tous les droits et modifiés ces documents où je me trompe? Le cas d'usage ici était de stocker quelque part la liste de toutes les CGU déjà acceptés par l'utilisateur (pour l'instant le store enregistre juste à chaque install), on n'a pas encore d'usage directement depuis nos apps mais on pense que ça facilitera à terme la gestion des CGUs dans le Cozy.

nono commented 5 years ago

Mais ça ne changera rien au fait qu'un app pourra demander tous les droits et modifiés ces documents où je me trompe?

Tout à fait, techniquement, ça ne contraint pas les apps, ça ne fait que les encourager à aller dans le bon chemin (ce qui pourra nous aider à éviter de lourdes migrations si on veut imposer une règle de ce type côté stack plus tard).

CPatchane commented 5 years ago

@edas What do you think about adding this apps relationship here? To add all apps installed with this specific terms.

edas commented 5 years ago

I am not against adding this relationship but I would prefer waiting to need it before defining anything

nono commented 5 years ago

@edas but we need it now for BI. Or am I missing something?

edas commented 5 years ago

AFAIR, the terms for B.I. should be approved directly on the connectors when configuring or installing them. I don't see where we need to access this couchdb. Am I missing something ?

nono commented 5 years ago

AFAIR, the terms for B.I. should be approved directly on the connectors when configuring or installing them.

Yes, but we must also keep the information in CouchDB about which version of the terms was signed, at which date, etc. It will be used later if there are new versions of the terms to know which user should accept the new terms.

edas commented 5 years ago

I don't remember any process to update the BI terms outside of configuring/installing a connector. If @ptbrowne confirms there a need to keep this kind of data, then let's do it here. Fine with me 👌

CPatchane commented 5 years ago

Ok finally we don't want for now to handle relationships with terms, here are my issues about that:

Finally, this way is bringing me to much technical reflexions and complications for something we maybe don't want in the future, so I won't use relationships here. At term, if we want to retrieve all applications linked to an application, we can use the terms property from the application manifest to retrieve the wanted terms according to the id and version in the database.