From dae5e20b1ba4aafd194cb1ec8be489920075f3c5 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 Signed-off-by: Martin Renvoize (cherry picked from commit b3d1a5bfecbfbac4af8335757414def1ee3e2df5) Signed-off-by: Fridolin Somers --- .../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 180d941562..4fce4fd6b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -508,6 +508,7 @@ function validate1(date) {
  • Relatives' checkouts
  • [% END %]
  • Fines & Charges
  • + [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
  • [% IF ( holds_count ) %] [% holds_count %] Hold(s) @@ -515,6 +516,7 @@ function validate1(date) { 0 Holds [% END %]
  • + [% END %] [% IF Koha.Preference('ArticleRequests') %]
  • [% patron.article_requests_current.count %] Article requests @@ -574,6 +576,7 @@ function validate1(date) { [% INCLUDE borrower_debarments.inc %] +[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
    [% IF ( holds_count ) %]
    @@ -626,7 +629,7 @@ function validate1(date) { [% ELSE %]

    Patron has nothing on hold.

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