Summary: | AdditionalContents displays blocks for every library prior to login | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | OPAC | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Owen Leonard <oleonard> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, jonathan.druart, kyle, lucas, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 28955 | ||
Attachments: |
Bug 29332: Set default library limits in search_for_display
Bug 29332: Unit tests Bug 29332: Set default library limits in search_for_display Bug 29332: Set default library limits in search_for_display Bug 29332: Unit tests Bug 29332: Set default library limits in search_for_display |
Description
Martin Renvoize (ashimema)
2021-10-27 10:49:24 UTC
Created attachment 126960 [details] [review] Bug 29332: Set default library limits in search_for_display Koha::AdditionalContents->search_for_display needs to filter to just items with a 'null' branchcode if no library_id is passed. Test plan 1/ Add some additional content blocks that should display only for specific branches. 2/ Navigate to the OPAC and note that blocks display for all libraries prior to login 3/ Login to the OPAC and note that now you only see you users library block 4/ Apply the patch 5/ Repeat steps 2 and 3 and note that now you see only the 'All libraries' blocks display prior to login and that 'All libraries' + 'Your users library' blocks appear after login. Created attachment 126962 [details] [review] Bug 29332: Unit tests This patch adds unit tests to ensure we do not leak branch specific addtional contents blocks outside of logged in sessions (i.e. where a users branch is not yet set). Created attachment 126963 [details] [review] Bug 29332: Set default library limits in search_for_display Koha::AdditionalContents->search_for_display needs to filter to just items with a 'null' branchcode if no library_id is passed. Test plan 1/ Add some additional content blocks that should display only for specific branches. 2/ Navigate to the OPAC and note that blocks display for all libraries prior to login 3/ Login to the OPAC and note that now you only see you users library block 4/ Apply the patch 5/ Repeat steps 2 and 3 and note that now you see only the 'All libraries' blocks display prior to login and that 'All libraries' + 'Your users library' blocks appear after login. Created attachment 126991 [details] [review] Bug 29332: Set default library limits in search_for_display Koha::AdditionalContents->search_for_display needs to filter to just items with a 'null' branchcode if no library_id is passed. Test plan 1/ Add some additional content blocks that should display only for specific branches. 2/ Navigate to the OPAC and note that blocks display for all libraries prior to login 3/ Login to the OPAC and note that now you only see you users library block 4/ Apply the patch 5/ Repeat steps 2 and 3 and note that now you see only the 'All libraries' blocks display prior to login and that 'All libraries' + 'Your users library' blocks appear after login. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 126992 [details] [review] Bug 29332: Unit tests This patch adds unit tests to ensure we do not leak branch specific addtional contents blocks outside of logged in sessions (i.e. where a users branch is not yet set). Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 126993 [details] [review] Bug 29332: Set default library limits in search_for_display Koha::AdditionalContents->search_for_display needs to filter to just items with a 'null' branchcode if no library_id is passed. Test plan 1/ Add some additional content blocks that should display only for specific branches. 2/ Navigate to the OPAC and note that blocks display for all libraries prior to login 3/ Login to the OPAC and note that now you only see you users library block 4/ Apply the patch 5/ Repeat steps 2 and 3 and note that now you see only the 'All libraries' blocks display prior to login and that 'All libraries' + 'Your users library' blocks appear after login. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Straight forward fix with test, PQA Pushed to master for 21.11, thanks to everybody involved! |