When the Interlibrary Loans module is enabled the menu option "ILL Requests" is added to the main intranet screen and the "More" dropdown menu. These options are displayed regardless of whether the logged in user has any permissions on this module. They should only be displayed if the user has permissions to work with ILL.
Created attachment 73615 [details] [review] Bug 20515 - "ILL Request" menu options displayed when user has no ILL This patch adds the following additional conditions to the display of both the ILL Requests drop down "More" menu option and the "ILL Requests" option on the intranet front page: Before: [% IF Koha.Preference('ILLModule') %] After: [% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %] This prevents the options being displayed to users who have no permissions to work with ILL. Test plan: View both the intranet front page and "More" dropdown while logged in as a user without ILL permissions, ensure the options do not display. Then do the same with a user with ILL permissions, ensure the options do display.
Created attachment 73643 [details] [review] Bug 20515 - "ILL Request" menu options displayed when user has no ILL This patch adds the following additional conditions to the display of both the ILL Requests drop down "More" menu option and the "ILL Requests" option on the intranet front page: Before: [% IF Koha.Preference('ILLModule') %] After: [% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %] This prevents the options being displayed to users who have no permissions to work with ILL. Test plan: View both the intranet front page and "More" dropdown while logged in as a user without ILL permissions, ensure the options do not display. Then do the same with a user with ILL permissions, ensure the options do display. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Hi Andrew, all good, but you don't need the superlibrarian bit - can you please remove those in a little follow up and set back to signed off? Thx!
Created attachment 73875 [details] [review] Bug [20515] - [Follow up] Removed the test for CAN_user_superlibrarian as requested
Hi Andrew, please remember to set the Assignee field!
Created attachment 74065 [details] [review] Bug 20515 - "ILL Request" menu options displayed when user has no ILL This patch adds the following additional conditions to the display of both the ILL Requests drop down "More" menu option and the "ILL Requests" option on the intranet front page: Before: [% IF Koha.Preference('ILLModule') %] After: [% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %] This prevents the options being displayed to users who have no permissions to work with ILL. Test plan: View both the intranet front page and "More" dropdown while logged in as a user without ILL permissions, ensure the options do not display. Then do the same with a user with ILL permissions, ensure the options do display. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 74066 [details] [review] Bug [20515] - [Follow up] Removed the test for CAN_user_superlibrarian as requested Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 74067 [details] [review] Bug 20515: Fix permission check on "ILL request" menu options This patch adds the following additional conditions to the display of both the ILL Requests drop down "More" menu option and the "ILL Requests" option on the intranet front page: Before: [% IF Koha.Preference('ILLModule') %] After: [% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %] This prevents the options being displayed to users who have no permissions to work with ILL. Test plan: View both the intranet front page and "More" dropdown while logged in as a user without ILL permissions, ensure the options do not display. Then do the same with a user with ILL permissions, ensure the options do display. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 74068 [details] [review] Bug 20515: (QA follow-up) Remove specific superlibrarian check Removed the test for CAN_user_superlibrarian as requested Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I've also fixed the commit messages (free this time ;) ), but please take a look at https://wiki.koha-community.org/wiki/Commit_messages for your next patches!
What about this one too? 121 [% IF Koha.Preference('ILLModule') %] 122 <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li> 123 [% END %] koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
Created attachment 74154 [details] [review] Bug 20515: (follow-up) Add missing CAN_user_ill This follow up patch adds two missing CAN_user_ill tests in templates
Created attachment 74194 [details] [review] Bug 20515: (follow-up) Add missing CAN_user_ill This follow up patch adds two missing CAN_user_ill tests in templates Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 74195 [details] [review] Bug 20515: (QA follow-up) Fix capitalization on 'Ill Requests'
Took the chance to fix a tiny capitalization error pointed out by the patch.
Patches pushed to master for 18.05 Congratulations Andrew for your first patches in!
I think we miss a change in Auth.pm: 297 if ( $flags && $flags->{superlibrarian} == 1 ) { 298 $template->param( CAN_user_circulate => 1 ); And that should probably use IsSuperLibrarian()for the check (see bug 20649)
*** Bug 20646 has been marked as a duplicate of this bug. ***