-
Notifications
You must be signed in to change notification settings - Fork 356
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: Validate user authorized when mode ALL in enrollments [TECH-1589] #15583
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15583 +/- ##
============================================
+ Coverage 66.23% 66.24% +0.01%
- Complexity 31250 31265 +15
============================================
Files 3485 3485
Lines 129791 129788 -3
Branches 15145 15145
============================================
+ Hits 85964 85981 +17
+ Misses 36742 36726 -16
+ Partials 7085 7081 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…to TECH-1589-mode-all-authority
Kudos, SonarCloud Quality Gate passed! |
When org unit mode ALL, tracked entities and enrollments need to validate the user is authorized to use the mode.
That means the user has to either be a superuser or have the authority
F_TRACKED_ENTITY_INSTANCE_SEARCH_IN_ALL_ORGUNITS
. For now we will also consider the user being null a valid scenario to use the ALL mode, because the scheduler runs tasks with a null user.These changes have been applied to the new and old API.
Ticket: https://dhis2.atlassian.net/browse/TECH-1589