Bug 8160 - Link to cataloging appears for users without cataloging permission
authorOwen Leonard <oleonard@myacpl.org>
Tue, 29 May 2012 15:30:28 +0000 (11:30 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 5 Jun 2012 14:01:42 +0000 (16:01 +0200)
This patch wraps cataloging links on the staff client home
page and in the header menu with checks for edit_catalogue
OR edit_items permission.

To test, access the staff client as a user with various
permissions. The "cataloging" link on the main page and
in the header menu should only appear to a user with
edit_catalogue permission, edit_items permission, or both.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt

index 4783523..3d71d45 100644 (file)
@@ -16,7 +16,7 @@
                         <div class="bd">
                             <ul>
                             <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></li>
-                            [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
+                            [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
                             <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
                             [% END %]
                             [% IF ( CAN_user_acquisition ) %]
index 0e9aed6..492dca4 100644 (file)
@@ -41,7 +41,7 @@
                         <a class="icon_general icon_lists" href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
                     </li>
 
-                    [% IF ( CAN_user_catalogue || CAN_user_editcatalogue ) %]
+                    [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
                     <li>
                         <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
                     </li>