Bug 6841 - A member with cataloging permissions cannot change branches (when independ...
authorLiz Rea <lrea@nekls.org>
Tue, 6 Sep 2011 18:00:51 +0000 (13:00 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 14 Sep 2011 09:44:03 +0000 (21:44 +1200)
This patch does a couple of things.

1. Changes permission over all to set branch printer (change branch/Set Library) from "circulation" privileges to "view catalogue" permissions. Reasoning: anyone who has privileges to view catalogue could reasonably be expected to perhaps need to change the set branch, but you might have people who don't have circulate permissions who need to change the branch, centralized cataloguing, for example. Those people would never circ and wouldn't need circ privileges, but *would* need to be able to change the set branch.
2. Changes the template flags to see the "Set Library" link with independent branches set from "manage users" to "manage users or edit catalogue." Reasoning: even with indy branches on, there might be reasons for catalogers to be able to change the set branch (that reason was the impetus for this patch in the first place).

To test:
Create a user with only "View Catalogue" Permissions (no circulate permissions), that user should be able to change set library with Independent branches OFF.

With independent branches on, give a user edit catalogue permissions. That user should be able to change set library.

I want to add that this patch was specifically written in response to chris_n's bug report. It may not be practical for these changes to be in mainline, but I haven't thought of any reasons why it would be explicitly bad. That doesn't mean there aren't some, though.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
circ/selectbranchprinter.pl
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc

index 5ec6c11..b5adcfc 100755 (executable)
@@ -31,13 +31,14 @@ use C4::Branch; # GetBranches GetBranchesLoop
 # this will be the script that chooses branch and printer settings....
 
 my $query = CGI->new();
+
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user({
     template_name   => "circ/selectbranchprinter.tmpl",
     query           => $query,
     type            => "intranet",
     debug           => 1,
     authnotrequired => 0,
-    flagsrequired   => { circulate => "circulate_remaining_permissions" },
+    flagsrequired   => { catalogue => 1, },
 });
 
 my $sessionID = $query->cookie("CGISESSID");
index 58430fc..1faf0ca 100644 (file)
@@ -52,7 +52,7 @@
         [% ELSE %]
             <strong>[% LoginBranchname %]</strong>
             [% IF ( IndependantBranches ) %]
-                [% IF ( CAN_user_management ) %]
+                [% IF ( CAN_user_management || CAN_user_editcatalogue_edit_catalogue ) %]
                     (<a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>)
                 [% END %]
             [% ELSE %]