Commit Graph
14 Commits
Author SHA1 Message Date
Sulka HaroandGitHub 914ba78f36 Security improvement batch (#6622)
* Adds a new method for the server to push notifies to the client, which require administration privileges from the user. If there are messages in queue but user is not privileged, she is notified of pending messages

* Fix unit tests

* Increase timeouts on tests

* Add translations

* * Aggregate admin messages
* Send admin message on auth fail
* Sending messages over bus
* XSS filtering of objects sent over the REST API

* Warn users if their instance is world readable

* Fix adminnotifies init()

* Fix couple issues from Codacy
2021-01-07 22:46:55 +02:00
Sulka HaroandGitHub 801900597a Optimize Nightscout database usage (#5947)
* On periodic polls, only load delta for CGM data, treatments and device statuses
* Serve basic CGM data API queries from in-memory cache. Increases the Nightscout memory footprint but should significantly reduce the Mongo load
* Serve device status, CGM and treatment records from memory cache
* Support count parameter in /profile
2020-09-09 20:11:57 +03:00
Sulka Haro 359e6a6128 * Limit the default number of profiles returned by the API to fix issues with users who are syncing a large amount of profiles from an APS.
* Fix profile reporting
2020-08-19 11:03:21 +03:00
802d98684f Fixes #4991 - Now selects basal profile based day by day (#5572)
* Test profile settings

* NPM Version change

* Use console log

* Use console log for client

* Use console log for client.sbx

* Use console log for client.ddata

* Use console log for client again

* revert

* Added multi-profile reporting capabilities

Co-authored-by: VIS TFS Admin <liveid@visualsolution.co.uk>
2020-06-12 17:47:28 +03:00
Sulka HaroandJeremy Cunningham e622810094 Add error logging to all Mongo inserts 2018-10-16 08:00:20 -05:00
Ben West 0f735d0af5 implement read-access against token, mod default
Could see an endpoint changing the global server variable, `defaultRoles` as well.
Seems to work well to disable/enable access really quickly.
2016-08-04 15:40:02 -07:00
Jason Calabrese 3d88bd33a6 replace old wares.verifyAuthorization with ctx.authorization.isPermitted; some refactoring 2016-07-31 20:10:10 -07:00
MilosKozak b65d800619 profile editor, onthe fly profile conversion 2015-10-28 10:11:07 +01:00
Jason Calabrese 1787eb3123 some minor fixes and improvements for the profile editor 2015-08-22 10:36:02 -07:00
Jason Calabrese 4dfa2c438c ctx everywhere; fixed security.test.js 2015-06-04 23:20:18 -07:00
Jason Calabrese 90e2bfcbe9 resolve conflicts with @MilosKozak's profile-api after MQTT 2015-03-18 23:58:49 -07:00
MilosKozak 2575b6a4a9 New profile api 2015-03-18 20:02:30 +01:00
Jason CalabreseandJason Calabrese 7653ef5b20 no POSTs yet 2015-02-25 22:46:54 -08:00
Jason CalabreseandJason Calabrese ea1dbccdb8 forgot to git add some profile api files 2015-02-25 22:45:53 -08:00