-
Notifications
You must be signed in to change notification settings - Fork 355
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: Make capture mode return enrollments in capture scope [TECH-1635] #15518
fix: Make capture mode return enrollments in capture scope [TECH-1635] #15518
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15518 +/- ##
============================================
+ Coverage 66.21% 66.23% +0.02%
- Complexity 31216 31246 +30
============================================
Files 3485 3485
Lines 129739 129766 +27
Branches 15134 15142 +8
============================================
+ Hits 85905 85952 +47
+ Misses 36749 36735 -14
+ Partials 7085 7079 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 25 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -204,6 +206,9 @@ public List<Enrollment> getEnrollments(EnrollmentOperationParams params) | |||
&& queryParams.isOrganisationUnitMode(OrganisationUnitSelectionMode.ACCESSIBLE)) { | |||
queryParams.setOrganisationUnits(user.getTeiSearchOrganisationUnitsWithFallback()); | |||
queryParams.setOrganisationUnitMode(OrganisationUnitSelectionMode.DESCENDANTS); | |||
} else if (user != null && queryParams.isOrganisationUnitMode(CAPTURE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should apply the same fix to the next method that gets a Page of enrollments
…ments' into TECH-1635-capture-mode-in-enrollments
Kudos, SonarCloud Quality Gate passed! |
Capture mode in /enrollments returns enrollments in search scope, which should not happen.
With this fix, we return only enrollments in the user capture scope.