From 7161adb3bbf05c6b156c73829bbeab7e4bf0a13b 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 Signed-off-by: Michele Morgan Signed-off-by: Galen Charlton --- 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 c8bcb604ef..9723c021a2 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 @@ -817,7 +817,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