LP#1990306: avoid VIEW_USER perm lookup on egPatronApp startup when we have a null...
authorJeff Davis <jeff.davis@bc.libraries.coop>
Tue, 18 Oct 2022 19:42:26 +0000 (12:42 -0700)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 11 Jan 2023 15:51:57 +0000 (10:51 -0500)
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index fec6e90..0fc8841 100644 (file)
@@ -70,6 +70,7 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap', 'egUserBucketMod',
             // FIXME: the following is really just for PatronMessagesCtrl
             // and PatronCtrl, so we could refactor to avoid calling it
             // for every controller
+            if (!egCore.auth.token()) return go_promise;
             return egCore.perm.hasPermFullPathAt('VIEW_USER')
             .then(function(orgList) {
                 hasPermAt['VIEW_USER'] = orgList;