LP#1240657 - Creating and Deleting Closed Dates permissions wrong.
authorJosh Stompro <stomproj@larl.org>
Mon, 9 Nov 2015 02:51:04 +0000 (20:51 -0600)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 12 Feb 2016 22:00:07 +0000 (17:00 -0500)
The code referenced two permissions that didn't exist
CREATE_CLOSEING and DELETE_CLOSEING.  Should be CREATE_ORG_UNIT_CLOSING,
and DELETE_ORG_UNIT_CLOSING.

[RM note: the affected methods don't appear to be in use, however]

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm

index 050dfbb..d752589 100644 (file)
@@ -2760,7 +2760,7 @@ sub create_closed_date {
     my( $user, $evt ) = $U->checkses($authtoken);
     return $evt if $evt;
 
-    $evt = $U->check_perms($user->id, $cd->org_unit, 'CREATE_CLOSEING');
+    $evt = $U->check_perms($user->id, $cd->org_unit, 'CREATE_ORG_UNIT_CLOSING');
     return $evt if $evt;
 
     $logger->activity("user ".$user->id." creating library closing for ".$cd->org_unit);
@@ -2791,7 +2791,7 @@ sub delete_closed_date {
     ($cd_obj, $evt) = fetch_closed_date($cd);
     return $evt if $evt;
 
-    $evt = $U->check_perms($user->id, $cd->org_unit, 'DELETE_CLOSEING');
+    $evt = $U->check_perms($user->id, $cd->org_unit, 'DELETE_ORG_UNIT_CLOSING');
     return $evt if $evt;
 
     $logger->activity("user ".$user->id." deleting library closing for ".$cd->org_unit);