-
Notifications
You must be signed in to change notification settings - Fork 144
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
#12566 - Task synchronization on Android pulls tasks not related with… #12621
#12566 - Task synchronization on Android pulls tasks not related with… #12621
Conversation
… the user's jurisdiction
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
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.
Problem is not fixed for me, at least not fully; environment officers still pull tasks related to all/a lot of other entities that they don't have access to.
…RMAS-Project into bugfix-12566_task_sync_not_related_to_jurisdiction
…RMAS-Project into bugfix-12566_task_sync_not_related_to_jurisdiction
… the user's jurisdiction
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
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.
Seems to work fine; just one change request in terms of code readability
sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserService.java
Outdated
Show resolved
Hide resolved
… the user's jurisdiction - review change request
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
@@ -290,8 +290,12 @@ public List<UserReference> getUserReferences( | |||
userEntityJoinUsed = true; | |||
} | |||
if (filterByJurisdiction) { | |||
filter = CriteriaBuilderHelper.and(cb, filter, createCurrentUserJurisdictionFilter(cb, userRoot)); | |||
userEntityJoinUsed = true; | |||
if (hasRight(UserRight.SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION)) { |
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.
Actually, the conjunction stuff is probably pretty unnecessary; you can shorten this section to
if (!hasRight(...)) {
filter = CriteriaBuilderHelper.and(cb, filter, createCurrentUserJurisdictionFilter(....));
...
}
…ts if the CASE_SURVEILANCE feature is disabled
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
… the user's jurisdiction
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
filter = CriteriaBuilderHelper.and(cb, filter, createCurrentUserJurisdictionFilter(cb, userRoot)); | ||
userEntityJoinUsed = true; | ||
} | ||
// if (filterByJurisdiction) { |
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.
Remove the commented code; you can merge the PR afterwards :)
… the user's jurisdiction
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=12621 |
… the user's jurisdiction
Fixes #12566