Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Users module doesn't work with CouchDB 2.0 #953

Closed
jkleinsc opened this issue Feb 21, 2017 · 11 comments
Closed

Users module doesn't work with CouchDB 2.0 #953

jkleinsc opened this issue Feb 21, 2017 · 11 comments
Labels
🐛bug issue/pull request that documents/fixes a bug help wanted indicates that an issue is open for contributions wontfix indicates an issue/pull request will not be worked on

Comments

@jkleinsc
Copy link
Member

Expected behavior:
All functionality of the Users module should work with CouchDB 2.0
Actual behavior:
When a user who has admin rights navigates to the users module, they are redirected to login.
Steps to reproduce:
Setup HospitalRun to use CouchDB 2.0
Navigate to the Users module
Screenshots (if applicable):
N/A
OS and Browser:
All

@jkleinsc jkleinsc added Admin 🐛bug issue/pull request that documents/fixes a bug labels Feb 21, 2017
@adeolabadmus
Copy link
Contributor

The issue seems to be caused by this line in the documentation: Only administrators may browse list of all documents (GET /_users/_all_docs) which is clearly not the case in CouchDB 1.6.

The admin/users route makes an API call to fetch all users in the database: https://github.com/HospitalRun/hospitalrun-frontend/blob/master/app/adapters/user.js#L170. Since the currently logged-in user is not a CouchDB administrator, the call returns a 401 error response, which in turn logs the user out.

In 2.0, Only administrator accounts can successfully make such calls. I do not see any way to authenticate login using the administrator credentials since they are stored in the config file, and not in the _users database.

@jkleinsc
Copy link
Member Author

@adeolabadmus the 1.6 documentation says the same thing. I am talking to Jan Lehnardt of CouchDB about the issue. He thinks it is something they missed porting over.

@ahashp
Copy link

ahashp commented Apr 25, 2017

I think I'm hitting this bug / issue even though I used CouchDB 1.6 in my docker compose.....any ideas how to work around this please?

@sachin8778
Copy link

Hi, I am also facing this issue with CouchDB 1.6 and HospitalRun 1.0.0-beta. However this issue is not showing in HospitalRun 0.9.8 after downgrading to CouchDB 1.6, that combination is running fine.

@sachin8778
Copy link

ok, after adding "hradmin" & "test" into couchdb as admin problem resolved for now. But there should be real solution to this for production use.

@waleplanet
Copy link

after adding "hradmin" and test into "couchdb" 1.6 i still get redirected to login

@tangollama tangollama added the help wanted indicates that an issue is open for contributions label Sep 18, 2017
@LOKANADHAN
Copy link

Name or password is incorrect. in Project Fauxton

@LOKANADHAN
Copy link

Username: hradmin and password: test

@stale
Copy link

stale bot commented Aug 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix indicates an issue/pull request will not be worked on label Aug 7, 2019
@fox1t fox1t closed this as completed Aug 7, 2019
@adeolabadmus
Copy link
Contributor

Hello @fox1t. I see you closed this issue. Has it been fixed?

@fox1t
Copy link
Member

fox1t commented Aug 8, 2019

Hi @adeolabadmus!
We're now working on a new major version (2.0) of HospitalRun. Sadly, this issue won't be resolved and we're forced to close this issue.
Can you contribute to the project? If so ping me on slack since we will need a big community effort to build the best HIS!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug help wanted indicates that an issue is open for contributions wontfix indicates an issue/pull request will not be worked on
Projects
None yet
Development

No branches or pull requests

8 participants