[Bug 42623] New: Add ability to restrict which libraries can be selected in a report runtime parameter
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Bug ID: 42623 Summary: Add ability to restrict which libraries can be selected in a report runtime parameter Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Currently, if a report contains a runtime parameter for Library any user can select any library. This is at odds with work in BZ 16631 and BZ 42621 to allow restriction of data access by library & group. We would like to establish a way to denote in a report that a Library runtime parameter should either default to the user's library or allow selection of only libraries within that user's library group. This work should make sure to enforce these limits at the controller level as well so users cannot circumvent the limit by manually editing a report URL. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200264&action=edit Bug 42623: Limit report library runtime parameters based on LimitReportsBy This patch takes the report branch limits in the LimitReportsBy syspref and applies them to the runtime parameters in a library report Test plan: 1. Apply patch and restart_all 2. Create a report with a Library runtime parameter 3. Ensure LimitReportsBy is set to No restriction 4. Run the report, all libraries should show in the dropdown for the library runtime parameter 5. Set LimitReportsBy to Library 6. Run the report again, this time the parameter should be limited to your logged in branch 7. Set LimitReportsBy to Library group 8. Create a library group, add some branches to it including your logged in branch 9. Run the report, this time only the branches you added in your group should be visible 10. On the report screen, amend the URL to have a branchcode that is not in your library group (in the 'sql_params=') 11. You should see an error message when submitting the request that you are not authorised -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200265&action=edit Bug 42623: Add a unit test Patch from commit 8cf1253 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@openfifth.c | |o.uk Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42621 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 [Bug 42621] Extend report limitations by library to use library groups -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |CLAMS list of Sponsors| | Status|Needs Signoff |Signed Off Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200264|0 |1 is obsolete| | Attachment #200265|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200560&action=edit Bug 42623: Limit report library runtime parameters based on LimitReportsBy This patch takes the report branch limits in the LimitReportsBy syspref and applies them to the runtime parameters in a library report Test plan: 1. Apply patch and restart_all 2. Create a report with a Library runtime parameter 3. Ensure LimitReportsBy is set to No restriction 4. Run the report, all libraries should show in the dropdown for the library runtime parameter 5. Set LimitReportsBy to Library 6. Run the report again, this time the parameter should be limited to your logged in branch 7. Set LimitReportsBy to Library group 8. Create a library group, add some branches to it including your logged in branch 9. Run the report, this time only the branches you added in your group should be visible 10. On the report screen, amend the URL to have a branchcode that is not in your library group (in the 'sql_params=') 11. You should see an error message when submitting the request that you are not authorised Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200561&action=edit Bug 42623: Add a unit test Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200562&action=edit Bug 42623: (QA follow-up) Tidy Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- This works as described and will be helpful to consortia to be able to limit access to data and also conserve system resource. Thanks for working on this Matt! Testing notes: 8. Create a library group, add some branches to it including your logged in branch For step 8, make sure to check the box to Limit report access by group If you have the system preference LimitReportsBy set to 'Library group' and you don't have any library groups set up with 'Limit report access by group' then you won't be able to select any library as a runtime parameter. Instead the runtime parameter dropdown will just list 'No results found'. At first I thought that might be a bug, but it makes sense that you need a library group for Limit report access by group in order to LimitReportsBy 'Library group' Just noting it's important for documenting in the manual, or maybe there could even be a note added to the system preference to make that clear to administrators. I added a patch for tidying perl misc/devel/tidy.pl reports/guided_reports.pl because the qa script complained about missing spaces in a couple conditionals and some = that it wanted to be aligned. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org