LP1244354 Unnecessary user refresh after deletion can cause permission error
authorblake <blake@mobiusconsortium.org>
Fri, 1 Jul 2016 17:01:04 +0000 (12:01 -0500)
committerJason Etheridge <jason@esilibrary.com>
Wed, 17 May 2017 17:56:35 +0000 (13:56 -0400)
obj.refresh_all() was being called no matter what. It needs to be called only when
there is an issue deleting the patron. On success, this patch will simply present an
informational message to the user.

Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
Open-ILS/xul/staff_client/server/patron/display.js

index 99c92b8..1d3b68e 100644 (file)
@@ -108,6 +108,7 @@ staff.patron.display.cmd_patron_delete.dest_user.title=Destination User
 staff.patron.display.cmd_patron_delete.dest_user.failure=Failed to retrieve destination user.  User deletion aborted.
 staff.patron.display.cmd_patron_delete.dest_user.self_reference_failure=Cannot specify the deleted user as the destination user.  User deletion aborted.
 staff.patron.display.cmd_patron_delete.override_prompt=Override patron deletion failure?
+staff.patron.display.cmd_patron_delete.success_message=Patron deleted. Please close tab.
 staff.patron.display.spawn_editor.editing_related_patron=Editing Related Patron
 staff.patron.display.init.retrieving_patron=Retrieving Patron...
 staff.patron.display.init.retrieving=Retrieving...
index 7eaca57..04a9dd7 100644 (file)
@@ -142,8 +142,11 @@ patron.display.prototype = {
                                                 return;
                                             break;
                                         }
+                                        obj.refresh_all();
+                                    }
+                                    else {
+                                        alert( document.getElementById('patronStrings').getString('staff.patron.display.cmd_patron_delete.success_message') );
                                     }
-                                    obj.refresh_all();
                                 }
                             } catch(E) {
                                 obj.error.standard_unexpected_error_alert('Error in server/patron/display.js -> cmd_patron_delete: ',E);