From 9e5fcb0d5dd230946719ee4825a3d41bd18effe7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 27 Feb 2014 08:55:22 -0500 Subject: [PATCH] Bug 11866: do not require special permissions to view course reserves in staff interface A librarian with no course reserves permissions cannot view course reserves from the staff intranet, yet can from the OPAC. This doesn't make much sense. Librarians should not require any course reserves permissions to view courses and reserves from the staff intranet. Test Plan: 1) Log into staff intranet as a librarian with no course reserves permissions 2) Note you cannot view course reserves 3) Apply this patch 4) Note you can now view course reserves 5) Verify you cannot modify courses or course reserves Signed-off-by: Owen Leonard Bug 11866 [Follow-up] Staff side course reserves too restrictive This follow-up patch adds a check for the "UseCourseReserves" system preference to the display of the Course reserves menu item in the header. To test, view the "More" menu with the "UseCourseReserves" system preference on and off. The menu item should appear and disappear accordingly. Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- course_reserves/course-reserves.pl | 1 - koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 2 +- .../prog/en/modules/course_reserves/course-details.tt | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl index b81bc94d5f..4aa982a0a2 100755 --- a/course_reserves/course-reserves.pl +++ b/course_reserves/course-reserves.pl @@ -35,7 +35,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $cgi, type => "intranet", authnotrequired => 0, - flagsrequired => { coursereserves => '*' }, } ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index b6bc66035e..30c431b631 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -22,7 +22,7 @@ [% IF ( CAN_user_serials ) %]
  • Serials
  • [% END %] - [% IF ( CAN_user_coursereserves ) %] + [% IF ( UseCourseReserves ) %]
  • Course reserves
  • [% END %] [% IF ( CAN_user_reports ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 5e69702749..ea58136b56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -17,7 +17,7 @@ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], "iDisplayLength": 20, "aoColumnDefs": [ - { 'bSortable': false, 'aTargets': [ 9, 10, 11 ] } + { 'bSortable': false, 'aTargets': [ 'NoSort' ] } ] })); @@ -82,9 +82,9 @@ Library Staff note Public note - [% IF CAN_user_coursereserves_add_reserves %] [% END %] - [% IF CAN_user_coursereserves_delete_reserves %] [% END %] - Other course reserves + [% IF CAN_user_coursereserves_add_reserves %] [% END %] + [% IF CAN_user_coursereserves_delete_reserves %] [% END %] + Other course reserves -- 2.39.5