From 4dc2d776e2bdad3c26c224f896c996a247ef1958 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 18 Dec 2019 09:46:51 +0100
Subject: [PATCH] Bug 24232: Hide the "Delete biblio" if permission
 edit_catalogue not set

The script moveitem.pl requires editcatalogue => 'edit_items', the
deletion of a biblio editcatalogue => edit_catalogue. Even if weird I
guess we could have a librarian with edit_items but edit_catalogue.
---
 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
index b53bef41f9..9dce4fcaf3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
@@ -52,7 +52,7 @@
 
 	[% ELSE %]
 	    [% IF ( success ) %]
-            [% IF from_biblio.items.count == 0 %]
+            [% IF from_biblio.items.count == 0 && CAN_user_editcatalogue_edit_catalogue %]
                 <div class="dialog alert" id="del-bib-alert">
                     <div id="del-bib-action">
                         The record <em><a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% from_biblio.id | html %]">[% from_biblio.title | html %]</a></em> has [% from_biblio.items.count | html %] attached items.
-- 
2.11.0