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

"Vital" doctypes should be created by the DataSystem and not the Home

Open babolivier opened this issue 9 years ago • 5 comments

Doctypes like cozyinstance, user, stackapplication, etc.

Creating them with the DataSystem can lead to a problem if the Home is started before the DataSystem.

babolivier avatar Jul 30 '15 12:07 babolivier

This would prevent random problem for user installing Cozy with the Debian or Arch packages.

clochix avatar Jul 31 '15 08:07 clochix

Mmmmm... I'm not sure. Home can't start without data-system. So, it doesn't work if home starts before data-system (with "Vital" view or not).

poupotte avatar Aug 12 '15 12:08 poupotte

I'll have to try it again on my side (new comp, doesn't have my install scripts with me, will have to copy them when I can access to my old one), but I'm pretty sure to remember that the home wasn't returning any error when started before the data-system.

babolivier avatar Aug 12 '15 12:08 babolivier

Home begins by view creations, so if data-system isn't started before home, it cannot create his views. Thus, create 'Vital' docType can help for some home actions but it's not enough. Home needs lots of request. In my mind, it isn't logical to create, as an example, file/byImage in data-system.

For me, problem is more "force home to start after data-system" (controller should ensure that) than "declare 'Vital' docType in data-system".

However, separate 'common' and 'vital' docType seems a good idea for permissions. Indeed, as an example, only home should access to docType 'Access' which contains applications token even if an application has 'Access' in his permissions.

poupotte avatar Aug 12 '15 13:08 poupotte

Sure, forcing the start of the home after the data-system can be a valid solution too. Indeed, having this kind of separation between doctypes could increase the platform's security.

babolivier avatar Aug 12 '15 13:08 babolivier