[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. fdfef96b5aaf11aaa7ffbde68f37b94ec569517c

Evergreen Git git at git.evergreen-ils.org
Tue Mar 15 14:17:47 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_10 has been updated
       via  fdfef96b5aaf11aaa7ffbde68f37b94ec569517c (commit)
      from  a92fbe424684a49e83b3061c11aacbb96fd1e68d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fdfef96b5aaf11aaa7ffbde68f37b94ec569517c
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Mar 15 12:31:37 2016 -0400

    LP#1557621 Verify password barcode / deleted users repair
    
    * Fixes bug that caused password verify calls to fail with an exception
      when tested with a barcode.
    
    * Verify API always returns false when tested on deleted users.
    
    To test:
    
    1. In the staff client, navigate to Circulation -> Verify Credentials
    2. Confirm username and barcode lookups return success for a non-deleted
       user using the correct password.
    3. Delete a test user in the database:
       UPDATE actor.usr SET deleted = TRUE WHERE id = <id-of-test-user>;
    4. Re-do step 2 confirming non-success results are returned.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 87fb870..1e0593d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -3293,11 +3293,10 @@ sub verify_user_password {
         $user_by_username = $e->search_actor_user({usrname => $username})->[0] or return 0;
         $user = $user_by_username;
     }
-    return 0 if (!$user);
+    return 0 if (!$user || $U->is_true($user->deleted));
     return 0 if ($user_by_username && $user_by_barcode && $user_by_username->id != $user_by_barcode->id);
     return $e->event unless $e->allowed('VIEW_USER', $user->home_ou);
-    return $U->verify_migrated_user_password(
-        $e, $user_by_username->id, $password, 1);
+    return $U->verify_migrated_user_password($e, $user->id, $password, 1);
 }
 
 __PACKAGE__->register_method (

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Actor.pm  |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list