Closed CPatchane closed 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.
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).
@edas What do you think about adding this apps
relationship here? To add all apps installed with this specific terms.
I am not against adding this relationship but I would prefer waiting to need it before defining anything
@edas but we need it now for BI. Or am I missing something?
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 ?
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.
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 👌
Ok finally we don't want for now to handle relationships with terms, here are my issues about that:
{"error":"code=403, message=reserved doctype io.cozy.konnectors unwritable"}
)terms
doctype here, this is making things more complicated:
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.
Will be used by the Store to save the accepted terms on application install (if the application has terms)