Protect patron data behind a staff login permission
authorMike Rylander <mrylander@gmail.com>
Wed, 3 Jun 2020 14:08:35 +0000 (10:08 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 3 Jun 2020 14:08:35 +0000 (10:08 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm

index dd9fef5..caa415a 100644 (file)
@@ -75,6 +75,10 @@ sub fetch_appointments { # returns appointment for user at location
 
     return new OpenILS::Event("BAD_PARAMS", "desc" => "No user ID supplied") unless $usr;
 
+    unless ($usr == $e->requestor->id) {
+        return $e->die_event unless $e->allowed("STAFF_LOGIN");
+    }
+
     my $slots = $e->search_action_curbside([{
         patron    => $usr,
         delivered => { '=' => undef },