esaude / esaude-emr-poc

This project is an AngularJS application for point of care based on OpenMRS and using Bahmni code. The UI was designed for tablet-like interfaces with touch screen and virtual keyboard. A demo of the system can be found here.
http://www.esaude.org/community-projects/point-of-care
MIT License
6 stars 17 forks source link

When upgrading from OpenMRS 1.11.5 to eSaude 1.4.5/POC 2.0.2, which Roles and Privileges must be added to users to allow login? #709

Open kml27 opened 6 years ago

kml27 commented 6 years ago

Actual Results

Currently, the existing database already contains Roles and Privileges that appear to differ from those required to use eSaude POC. Users, both imported and newly created are unable to login with the error message that the user does not have some functions. This happens both with existing users who have POC Roles newly assigned and new users.

Only users with the System Developer role appear to function as expected.

Some combinations (All roles except Data Assistant, Data Manager, and System Developer checked), appear to allow login, but no dashboard navigation buttons are visible even though all POC Roles are assigned.

I am double checking that creating a new user in a fresh install of eSaude, adding POC Roles and adding to Providers list, allows login to POC. I believe it has worked in previous attempts. I will add to this issue when I have additional testing results.

Expected results

After adding POC roles, users can login to POC and see POC Dashboard navigation without being System Developers.

Intended Roles and Privileges should be known and documented for implementers upgrading from OpenMRS 1.11.5 to assign accordingly to their POC users (Assigning POC roles still requires decisions on the part of the implementers since there are few corresponding Roles for POC before POC installation).

Steps to replicate

Existing User

In OpenMRS 1.11.5, create a new user. In Providers -> Manage Providers, click Add Provider. Input the new users id and name. Click Save.

Upgrade using 1.9.9 of the eSaude Installer.

After installation, navigate to /openmrs Login as admin/Admin123

Navigate to Users -> Manage Users. Search for the user that was created in OpenMRS 1.11.5 Select that user. Add only POC Roles. Click Save User.

(Optionally, change admin password and add POC Roles for admin to use in e2e tests method of replicating with new user created after upgrade).

Attempt to login to POC using the new user. Attach screenshot is similar to observed result with same error message.

Optionally, replicate same issue with new user by running login_test.js e2e tests. The test for login by a user that is not a Provider will show this error message too, rather than the "not a provider" message.

Screenshot/Attachment (Optional)

A visual description of the unexpected behaviour. attempt_to_login_with_a_user_that_does_not_have_the_provider_role failed

kml27 commented 6 years ago

I have double checked, and found it does work as expected in a new install. I created a new user in a fresh install of eSaude, added the Clinician, Provider, and the POC: Pharmacist Independent (Admin) Roles, added the new user to the Providers list from Manage Providers, set the default location for the installation under Maintenance | Settings, and this combination of settings does allow login to POC with the appropriate dashboard navigation.

ynurmahomed commented 6 years ago

As far as I know, to be able to login users are only required to be added to providers list.

Users should only be able to use an app from home dashboard if they are assigned corresponding POC roles.

Looking at sessionService.js#L115-L144 I don't think there will be anything helpful on console. Will have to debug, but I can't find v1.9.9 of installer.

Anything in docker logs?

kml27 commented 6 years ago

https://bintray.com/esaude/installer/installer/1.9.9

I'll send the docker logs later today.

[edit] I see bintray is actually showing that file as missing, and esaude as rate-limited.

I sent them an message, but I will upload the bin to github or gdrive later today.

kml27 commented 6 years ago

esaude-emr-poc.log esaude-platform-tomcat.log esaude-platform-mysql.log

kml27 commented 6 years ago

I don't see the 1.9.9 file listed on bintray's html pages anymore...

and the alert from Bintray "Your organization, 'esaude', has been rate-limited. Please contact us."

I downloaded it from https://bintray.com/esaude/installer/download_file?file_path=install-esaude-1.9.9.run two days ago...

kml27 commented 6 years ago

The installer v1.9.9 binary is now available on GitHub

https://github.com/esaude/installer/releases/download/v1.9.9/install-esaude-1.9.9.run