From a11aca1282575bb13b9b904a1d8898c5109ac1dd Mon Sep 17 00:00:00 2001 From: blake Date: Fri, 1 Jul 2016 12:01:04 -0500 Subject: [PATCH] LP1244354 Unnecessary user refresh after deletion can cause permission error 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 Signed-off-by: Jason Etheridge --- Open-ILS/xul/staff_client/server/locale/en-US/patron.properties | 1 + Open-ILS/xul/staff_client/server/patron/display.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index 99c92b86f8..1d3b68e483 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -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... diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 7eaca57729..04a9dd7137 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -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); -- 2.11.0