Ecohackerfarm / powerplant

Optimize and assist planning your garden
Other
85 stars 21 forks source link

Allow only localhost to modify central database #63

Closed petteripitkanen closed 5 years ago

petteripitkanen commented 5 years ago

Currently all changes that any client makes get synchronized to the server and all clients by PouchDB. Restrict this by allowing only clients from localhost to modify the central server database (with npm run migrate and npm run cli). This is the first step of implementing #40.

petteripitkanen commented 5 years ago

Fixed by #66, the PouchDB way is to specify admin user and create a design document with validate_doc_update function for restricting write access.