Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot view concepts in private source as an org member #853

Closed
ibacher opened this issue Jul 21, 2021 · 6 comments
Closed

Cannot view concepts in private source as an org member #853

ibacher opened this issue Jul 21, 2021 · 6 comments
Assignees
Labels
api2 OCL API v2 bug Something isn't working

Comments

@ibacher
Copy link

ibacher commented Jul 21, 2021

This was uncovered in production by @michaelbontyes. He couldn't see any concepts in the MSFOCP / BD dictionary that were from the corresponding source (MSFOCP / BD). The source was marked as "private" (i.e. public_access: None). Changing the source to be public public_access: View fixed the issue, but as his account is a member of the MSFOCP organisation, he should be able to see the concepts from that source in his dictionary.

Basically, when he was logged in a request to https://api.openconceptlab.org/orgs/MSFOCP/collections/BD/concepts/?page=1&limit=10&q=&sortAsc=id&source=BD&includeRetired=false returned no results.

@paynejd
Copy link
Member

paynejd commented Jul 21, 2021 via email

@michaelbontyes
Copy link

Hi @paynejd, I was using the OCL for OpenMRS UI (https://openmrs.openconceptlab.org/orgs/MSFOCP/collections/BD/concepts/)

@ibacher
Copy link
Author

ibacher commented Jul 22, 2021

@paynejd Yeah, we pretty much always send the API token associated with user for every request except to get the list of public dictionaries or public sources (when retrieving the concepts from those dictionaries, though, we do send the API token). I'd assume the API token is correct because it's the one returned by sending a POST request to the login end-point.

I wonder, though, if this might've somehow been related to the API2 migration (MSFOCP was built when we were still using API1)?

@snyaggarwal
Copy link
Contributor

@ibacher I think you are right. It looks like a bug in oclapi2. I will check this.

@snyaggarwal snyaggarwal added api2 OCL API v2 bug Something isn't working labels Jul 22, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Jul 22, 2021
@snyaggarwal
Copy link
Contributor

@michaelbontyes @ibacher This should be fixed now. Let me know if you still face any issue in this.

@ibacher
Copy link
Author

ibacher commented Jul 23, 2021

Thanks @snyaggarwal! I'll let you know if this comes up again, but for now, I think we can close this.

@ibacher ibacher closed this as completed Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api2 OCL API v2 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants