From 51ce32d4ad6374aff869fc96ba22f8b921a50917 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 9 Dec 2016 20:45:33 -0500 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/staff/admin/workstation/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.11.0