Community Health Toolkit

Cannot use application with roles other than admin

NOTE: This is a public repository. Images or logs containing protected health information (PHI) must be fully-redacted.

Describe the Bug
A short description of the issue or error you are encountering:
I am testing the reference application locally, and logging in as an admin seems to work fine, however it is not possible to see tasks/targets and test offline functionality as such. That being the reason why I tried to create a CHW or CHW supervisor profile, to test said functionality. I have, however, not managed to log in with any other role, other than admin. I log in with data entry profile either, it always say that I do not have the right/permission to access the information, or in the case of logging in with CHW /Supervisor it says to check the connection (which I do have).

How To Reproduce The Issue
List steps for someone trying to reproduce the behavior. For example:

  1. Go to the administration panel
  2. Create a new user with CHW supervisor role
  3. Log out and log back in
  4. See error

Expected Behavior
A short description of what you expected to happen:
Successful log in and visualization of the different tabs (report, tasks, target and so on)


Additional Context
I tried to create a new role with every permission, which did not work either. I tried to clear cache, clear cookies, no success. Also tried to log in without internet without success either. Tried CHW and other roles too.

1 Like

Hi @magp18,

Welcome to the Community Health Toolkit forum.

Please have a look at the testing locally with devices documentation

1 Like

Thank you!
I have been working with those instructions and was also able to connect via the application on my device and log in as admin. I was, however, not able to log in with other roles as e.g. CHW supervisor.

1 Like

Sorry that you’ve been having trouble with this! I am curious if the user set up may cause this issue. Can you share what the user fields look like in the Edit User form?

The Place is required in the Edit User form, but not the Add user form – perhaps omitting it could cause this issue.

Another possibility is that the permissions in the reference app are accidentally broken. I’ll try to reproduce your scenario locally to see what happens.

1 Like

Just a reference. I had done some troubleshooting on the medic-android issue. I think we can move the troubleshooting to this thread @magp18 .

1 Like

This is how it looks like for me, the image is too large to put the whole edit user form, so I only have the upper part, hope it is enough as I cannot use two images because of being new:

The place field is actually required, as soon as you choose a role (e.g. CHW supervisor) which is why I actually have one chosen.

1 Like

Yes, sorry that is actually also opened by me. We can gladly move it there.

1 Like

Thanks for sharing. We can continue to figure this out in the GitHub issue you opened.

1 Like