Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 21 Jun 2019 12:09:53 +0000 (13:09 +0100)
When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link.  The account is logged out automatically with the message:  "Error: you do not have permission to view this page.  Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button.  Works as expected if Superlibrarian permission is set.

This is just a typo in perl script : circulation instead of circulate

Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

circ/checkout-notes.pl

index 97fb925..324d15e 100755 (executable)
@@ -33,7 +33,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { circulation => "manage_checkout_notes" },
+        flagsrequired   => { circulate => "manage_checkout_notes" },
     }
 );