IMA-WorldHealth / bhima-1.X

A hospital information system for developing countries.
GNU General Public License v2.0
10 stars 14 forks source link

Remove insecure user_session route #844

Closed jniles closed 9 years ago

jniles commented 9 years ago

In several places in bhima, we use the following code to download the user details

   dependencies.user = {
     query : '/user_session'
   };

This is poor practice for many reasons: it is insecure, brittle, and we have the user session available immediately with the SessionService without sending an extra HTTP request. We should remove instances of the above code in bhima.