Summary: | Choose correct default header search tab according to permissions | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the display of the header search form on the staff interface home page so that staff patrons with different permissions will see the correct tab in the header search form. Previously, the default was to display the check out search - if they didn't have circulation permissions, the search tabs were initially hidden.
|
Version(s) released in: |
24.05.00,23.11.02
|
Attachments: |
Bug 35517: Choose correct default header search tab according to permissions
Bug 35517: Choose correct default header search tab according to permissions Bug 35517: Choose correct default header search tab according to permissions |
Description
Owen Leonard
2023-12-07 18:14:20 UTC
Created attachment 159661 [details] [review] Bug 35517: Choose correct default header search tab according to permissions This patch adds some additional template logic to the header search form for the staff interface home page so that users with different permissions will see the correct tab in the header search form. To test, apply the patch and view the staff interface home page using a user with different permissions: - 'catalogue' and 'circulate' - Header should show circulation search - 'catalogue' and 'borrowers' - Header should show patron search - 'catalogue' only - Header should show catalog search Created attachment 159677 [details] [review] Bug 35517: Choose correct default header search tab according to permissions This patch adds some additional template logic to the header search form for the staff interface home page so that users with different permissions will see the correct tab in the header search form. To test, apply the patch and view the staff interface home page using a user with different permissions: - 'catalogue' and 'circulate' - Header should show circulation search - 'catalogue' and 'borrowers' - Header should show patron search - 'catalogue' only - Header should show catalog search Signed-off-by: David Nind <david@davidnind.com> How should this interact with Bug 30230 ? Just do the following substitution? (CAN_user_borrowers_edit_borrowers) ↓↓ (CAN_user_borrowers_edit_borrowers) || (CAN_user_borrowers_list_borrowers) (In reply to Victor Grousset/tuxayo from comment #3) > (CAN_user_borrowers_edit_borrowers) || (CAN_user_borrowers_list_borrowers) That looks correct to me. In either case the user should have access to the patron search tab. Created attachment 160671 [details] [review] Bug 35517: Choose correct default header search tab according to permissions This patch adds some additional template logic to the header search form for the staff interface home page so that users with different permissions will see the correct tab in the header search form. To test, apply the patch and view the staff interface home page using a user with different permissions: - 'catalogue' and 'circulate' - Header should show circulation search - 'catalogue' and 'borrowers' - Header should show patron search - 'catalogue' only - Header should show catalog search Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Works, makes sense, QA script happy, code looks good, passing QA :) (In reply to Owen Leonard from comment #4) > (In reply to Victor Grousset/tuxayo from comment #3) > > > (CAN_user_borrowers_edit_borrowers) || (CAN_user_borrowers_list_borrowers) > > That looks correct to me. In either case the user should have access to the > patron search tab. This patch has not been pushed yet, I'll keep it in mind! (Waiting for a not hard follow-up... ) Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.02 (In reply to Katrin Fischer from comment #7) > This patch has not been pushed yet, I'll keep it in mind! (Waiting for a not > hard follow-up... ) It wasn't sure at the time of my 1st message here which one would be merged first. But when I QAed this one, I left a comment on bug 30230 to say that it needs a change. Quite a few merge conflicts with 23.05.x, no backport. If needed please rebase. |