From 2e1ff5e96108af91174d080b49e31d78a8f959fa Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 20 May 2018 04:23:47 +0200 Subject: [PATCH] Bug 20794: Hide holds tab on details when user lacks circulate_remaining_permissions If a user doesn't have circulate_remaining permissions, but has borrowers: - checkouts tab is hidden - details tab is visible - holds tab on details is visible, but results in an error The problem is that the svc/holds script requires circulate_remaining_permissions. To test: - Create 2 staff users with and without circulate_remaining_permissions Both need borrowers permission - Go to the details tab in a patron's account who has holds - Verify that you get a datatables error for the staff patron without circulate_remaining_permissions - Apply patch - Verify that now the holds tab is no longer displayed for this patron Signed-off-by: Amit Gupta Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/en/modules/members/moremember.tt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 881fb45cce..7a3ed75e99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -412,6 +412,7 @@
  • Relatives' checkouts
  • [% END %]
  • Fines & Charges
  • + [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
  • [% IF ( holds_count ) %] [% holds_count %] Hold(s) @@ -419,6 +420,7 @@ 0 Holds [% END %]
  • + [% END %] [% IF Koha.Preference('ArticleRequests') %]
  • [% patron.article_requests_current.count %] Article requests @@ -478,6 +480,7 @@ [% INCLUDE borrower_debarments.inc %] +[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
    [% IF ( holds_count ) %]
    @@ -530,7 +533,7 @@ [% ELSE %]

    Patron has nothing on hold.

    [% END %]
    - +[% END %] [% IF Koha.Preference('ArticleRequests') %] [% INCLUDE 'patron-article-requests.inc' %] -- 2.39.5