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

tech: Validate access when ordering by attributes and data element in /tracker [TECH-1610] #15608

Closed
wants to merge 2 commits into from

Conversation

lucaCambi77
Copy link
Contributor

@lucaCambi77 lucaCambi77 commented Nov 6, 2023

https://dhis2.atlassian.net/browse/TECH-1610

Validate access to de or tea while ordering in /tracker/events and /tracker/trackedentities.
It uses canRead validation of the acl service because canDataRead that is also used, for example, in validateAttributeOptionCombo method, does not follow sharing validation because DataElement is not shareable in the schema descriptor. Not sure this is by design. canDataRead follows another validation path for aoc which includes sharing checks eventually

@lucaCambi77 lucaCambi77 marked this pull request as ready for review November 6, 2023 11:09
@lucaCambi77 lucaCambi77 requested a review from a team November 6, 2023 11:10
Copy link

sonarqubecloud bot commented Nov 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
9.6% 9.6% Duplication

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #15608 (b738081) into master (2e9f30b) will increase coverage by 0.00%.
Report is 4 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master   #15608   +/-   ##
=========================================
  Coverage     66.23%   66.24%           
- Complexity    31241    31263   +22     
=========================================
  Files          3485     3485           
  Lines        129788   129826   +38     
  Branches      15141    15151   +10     
=========================================
+ Hits          85961    85997   +36     
+ Misses        36748    36742    -6     
- Partials       7079     7087    +8     
Flag Coverage Δ
integration 49.79% <91.42%> (+0.01%) ⬆️
integration-h2 32.41% <20.00%> (-0.01%) ⬇️
unit 30.35% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...acker/export/event/EventOperationParamsMapper.java 95.65% <100.00%> (+0.72%) ⬆️
...ckedentity/TrackedEntityOperationParamsMapper.java 90.67% <100.00%> (+1.05%) ⬆️

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e9f30b...b738081. Read the comment docs.

@lucaCambi77 lucaCambi77 closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant