From: Jason Stephenson Date: Sat, 10 Dec 2016 01:45:33 +0000 (-0500) Subject: LP 1648918: Remove Workstation at Root of User's Permission Tree X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fdyrcona%2Flp1648918-remove-workstation-fix;p=working%2FEvergreen.git LP 1648918: Remove Workstation at Root of User's Permission Tree If you register a workstation at the root of the user's permission tree in the webstaff client, you are not able to later remove it. The Remove button is dimmed. You can remove a workstation registered at any other org_unit where the user has the REGISTER_WORKSTATION permission. To reproduce this bug, login as the admin user and register a workstation at the CONS org_unit. Then, go to Workstation Administration and see that the Remove button is dimmed. To test the patch, do the same, but see that the Remove button is not dimmed. When you click it, the workstation is also removed. Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index dd51bc8129..34eb479913 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -724,7 +724,7 @@ function($scope , $q , $window , $location , egCore , egAlertDialog , workstatio $scope.can_delete_ws = function(name) { var ws = all_workstations.filter( function(ws) { return ws.name == name })[0]; - return ws && reg_perm_orgs.indexOf(ws.owning_lib); + return ws && reg_perm_orgs.indexOf(ws.owning_lib) != -1; } $scope.remove_ws = function(remove_me) {