https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621
--- Comment #24 from Matt Blenkinsop <[email protected]> --- Created attachment 200430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200430&action=edit Bug 42621: Add unit test for lib group limits Test plan: Prerequisites 1. Three branches: Centerville, Fairfield, Fairview 2. Admin - Library groups: create root group "Test Group", enable Limit report access by group, add Centerville and Fairfield as child libraries (not Fairview) 3. Create an admin user with manage_report_limits permission (or superlibrarian) at branch Centerville 4. Create regular users with reports + execute_reports only (no manage_report_limits), one at each of Centerville, Fairfield, and Fairview 5. Admin - Administration - Columns settings - Reports - Saved reports (table_reports) - enable the Library limits column (it is hidden by default) Baseline - LimitReportsBy = No restriction 6. Set LimitReportsBy = No restriction 7. Admin user - create Report A - no "Library limitation" field visible, save report with any parameters, content is not important 8. Admin user - Reports list - no "Library limits" column visible even if enabled in column settings. Library mode - regression 9. Set LimitReportsBy = Library 10. Admin user - Reports list - "Library limits" column visible (if enabled in column settings) 11. Log in as the Fairview user - Reports list - "Library limits" column not visible as user doesn’t have manage_reports_limit permission 12. Admin user - edit Report A - Library limitation field should be visible - set limit to Centerville - report saves with Centerville limit 13. Fairview user - Reports list - Report A not visible 14. Regular user at Centerville - Reports list - Report A visible 15. Regular user at Centerville - edit Report A - save - limits preserved (fieldset not shown; backend preserves existing limits silently) 16. Admin user - Report A visible with "1 library limitation" tooltip showing Centerville. Delete Report A Library group mode - setup and limits column 17. Set LimitReportsBy = library_group 18. Admin user - Reports list - "Library limits" column still visible 19. Regular user at Centerville - Reports list - "Library limits" column not visible 20. Admin user - create Report B, set limit to Centerville - "Library limitation" fieldset visible, saves with Centerville as the limit 21. Admin user - Reports list - Report B shows "Test Group" in limits column 22. Admin user - create Report C with no limit - Report C shows "No limitation" in limits column Library group mode - access by group membership 23. Fairfield user - Reports list - Report B visible (Fairfield is in the same group as Centerville). Report C also visible (no limitation) 24. Fairview user - Reports list - Report B not visible (Fairview not in group) 25. Fairview user - navigate directly to Report B URL - access denied 26. Fairview user - Reports list - Report C visible (no limitation) Library group mode - ft_reports flag required 27. Admin - Library groups: disable "Limit report access by group" on "Test Group" 28. Regular user at Fairfield - Reports list - Report B no longer visible as it was limited to Centerville 29. Admin user - Report B limits column - shows "No limitation" 30. Re-enable the flag - Fairfield can see Report B again Library group mode - non-admin save behaviour 31. Regular user at Centerville - create new Report D - save - Report D automatically limited to Centerville (backend sets own branch; no fieldset shown). Verify by viewing the saved reports table as the Admin user - should show Test group as the limitation 32. Regular user at Centerville - edit Report B - save - existing limits preserved unchanged Switching modes 33. With Report B limited to Centerville and LimitReportsBy = library_group - Fairfield can access 34. Switch to LimitReportsBy to Library - Fairfield can no longer access Report B (exact branch match only) 35. Switch back to library_group - Fairfield can access Report B again 36. Switch to none - all reports accessible; no limits column or fieldset anywhere -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
