stable

Clone or download

Read-only

feat: XTS reports show only trackers user can see

Closes request #37581 Align XTS behavior on trackers and projects Currently, in a report with several trackers, if user cannot see one of it, an exception is thrown and no results are shown. In the other hand, if user can see all trackers, but not all fields, as long as it can see at least 1 field, results corresponding to this field are shown. This commit align the first behavior with the second: in a report with several trackers, as long a user can see at least one tracker, results for this tracker are shown. But if user cannot see any tracker an exception is thrown. *Testing:* In 2 projects, have 1 tracker everyone can see and 1 only admins can see. - With a user admin of both projects, create a XTS report for the 4 trackers. You should see results from all trackers - With a user member of both projects, you should see only results from 2 trackers (the widget list only them) - With a user member of only 1 project, you should see only results from 1 trackers (the widget list only this one) Change-Id: Ib380d2e64fe30fec0a8afe7cde468f29afc3dee2

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/Permission/CrossTrackerPermissionGate.php +18 −6 Go to diff View file
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportRepresentation.php +8 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +4 −9 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CrossTrackerArtifactReportFactory.php +1 −1 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Permission/CrossTrackerPermissionGateTest.php +66 −55 Go to diff View file
A src/common/include/CheckUserCanAccessProject.php +31 −0 Go to diff View file
M src/common/include/URLVerification.class.php +2 −1 Go to diff View file
A tests/lib/Stubs/include/CheckUserCanAccessProjectStub.php +65 −0 Go to diff View file