https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621
--- Comment #100 from Matt Blenkinsop <[email protected]> --- Created attachment 208805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208805&action=edit Bug 42621: (QA follow-up) Use the root library group for report limits The saved reports list and direct report access used different rules when a group had sub-groups. The list collected the libraries under the user's immediate parent group. Direct access collected the libraries under the limited library's immediate parent group. With a root group holding Centerville and a sub-group holding Fairfield, a Centerville user saw a Fairfield-limited report but could not run it, and a Fairfield user could run a Centerville-limited report that was not listed. A library group now means the whole tree under the root group that has "Limit report access by group" ticked. This is the rule that local hold groups and local float groups already use (get_hold_libraries and get_float_libraries). library_group_limits returns the root groups and search_with_library_group_limits expands the root with all_libraries, so both sides agree. Libraries outside any such tree are still enforced as a group of one. The Library limits column now shows the root group title. Test plan: 1. Set LimitReportsBy to Library group 2. Create a library group "Reports test", tick "Limit report access by group", add Centerville to it 3. Add a sub-group "Sub" to "Reports test" and add Fairfield to "Sub" 4. Save a report limited to Fairfield and a report limited to Centerville 5. Create a staff user at Centerville and one at Fairfield with only catalogue and execute_reports 6. As the Centerville user: both reports are listed and both run 7. As the Fairfield user: both reports are listed and both run 8. As a user at a library outside the group: neither report is listed and opening either by URL with op=run gives "Access denied" 9. prove t/db_dependent/Koha/Reports.t Co-Authored-By: Claude Fable 5.1 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
