Repository navigation
Conversation
…tatistics (#1540) * Filter unreadable items/bitstreams from public usage-statistics reports Site-level TopItems and item TotalDownloads reports returned the name and UUID of items/files without checking the caller's READ permission, leaking withdrawn/embargoed/restricted content to anonymous users. Inject AuthorizeService and BitstreamService into UsageReportUtils and only add a point when the current user has READ on the resolved item/bitstream. Drop the unresolved raw-handle fallback in the site report. * Resolve download bitstreams legacy-safe and add non-admin READ test Use BitstreamService#findByIdOrLegacyId with a null/blank guard instead of UUID.fromString so migrated statistics rows with legacy numeric ids do not crash the TotalDownloads report. Add a test proving a non-admin eperson with an explicit READ policy still sees the restricted bitstream while another eperson without it does not. * fix: repair usage report tests and return canonical legacy UUIDs --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> (cherry picked from commit a88553d)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tento fix pochádza z
dtq-dev(v7). Cherry-pick dodtq-dev-9-basesa NEDAL aplikovať úplne čisto a bolo ho treba manuálne prispôsobiť v9. Prosím o dôkladný review.Čo bolo treba upraviť: produkčný kód (
UsageReportUtils) sa zlúčil čisto; konflikt bol len v testeStatisticsRestRepositoryIT(poradie importovCalendar/Date) — vyriešené ponechaním oboch. Logika nezmenená.Port of #1540 z
dtq-devdodtq-dev-9-base. Part of UFAL/Propagate PRs to v9: dataquest-dev/dspace-customers#1107🤖 Generated with Claude Code