Security: Offer only the people of the report in its person filter
Description
The person filter of a report and the recipients of a subscription offered
every employee of the company, so a team lead saw names of people whose data
the report would never show. They now offer only the people the reader sees
in that report: themselves, the team of a manager (also that of a permanent
substitute), everybody for HR and admins as the report allows. Recipients are
further limited to those who may receive the report. Two operations list
them, list and list, both paged.
A report run that names an employee outside the reader's scope in a person filter is refused with 403 instead of answering with no rows. A subscription with a recipient outside the reader's scope is refused with 422.
Impact
Integrations that sent an employee parameter of somebody outside the scope
get 403 instead of an empty report. A reference of another package that
points its options to the list of a report may use {report in the
path.