LP#1750894 Org-only trumps local settings
authorBill Erickson <berickxx@gmail.com>
Thu, 24 May 2018 20:00:32 +0000 (16:00 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 29 May 2018 14:13:36 +0000 (10:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/services/hatch.js

index bc9be01..12a25f7 100644 (file)
@@ -366,8 +366,12 @@ angular.module('egCoreMod')
         // If we have already attempted to retrieve a value for this
         // setting, then we can tell up front whether applying a value
         // at the server will be an option.  If not, store locally.
+        // Note that the existence of an org unit setting type and no
+        // user/ws setting type means applying a value locally is
+        // not allowed.
         var summary = service.serverSettingSummaries[key];
         if (summary &&
+            summary.has_org_setting() === 'f' &&
             summary.has_user_setting() === 'f' && 
             summary.has_workstation_setting() === 'f') {
 
@@ -431,7 +435,11 @@ angular.module('egCoreMod')
             return $q.when(service.keyCache[key] = val);
         }
 
-        if (summary.has_user_setting() === 'f' &&
+        // Note that the existence of an org unit setting type and no
+        // user/ws setting type means applying a value locally is
+        // not allowed.
+        if (summary.has_org_setting() === 'f' &&
+            summary.has_user_setting() === 'f' &&
             summary.has_workstation_setting() === 'f') {
 
             console.warn('No server setting type exists for '