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

fix: org unit access in search [DHIS2-16268] #1324

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Dec 11, 2023

This fixes an issue where organisation units were not appearing in search results because the user was deemed not to have access to the organisation unit. Note: this issue was for users without ALL authority (e.g. admin on our play instances)

Issue was that the code was assuming that api/me returned an array of orgUnit ids, but instead we are getting an array of objects like [{id: "someOrgUnit"}] (maybe this was an api change at some point?)

Before
image

After
image

(P.S. I noticed another bug that if you have clicked on multiple of these org unit selection search fields, the search results will appear in all of them, but I don't want to look at/fix that here)

@tomzemp tomzemp requested a review from a team December 11, 2023 09:04
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Dec 11, 2023

🚀 Deployed on https://pr-1324--dhis2-user.netlify.app

@tomzemp tomzemp force-pushed the DHIS2-16268/search-results branch from 875cf3d to 0474a2f Compare December 11, 2023 13:40
@tomzemp tomzemp merged commit 8dd538f into master Dec 11, 2023
12 checks passed
@tomzemp tomzemp deleted the DHIS2-16268/search-results branch December 11, 2023 14:08
dhis2-bot added a commit that referenced this pull request Dec 11, 2023
## [1.5.34](v1.5.33...v1.5.34) (2023-12-11)

### Bug Fixes

* org unit access in search [DHIS2-16268] ([#1324](#1324)) ([8dd538f](8dd538f))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.5.34 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

tomzemp added a commit that referenced this pull request Dec 11, 2023
* fix: org unit access in search [DHIS2-16268]

* fix: add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants