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)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 10 Feb 2023 15:12:45 +0000 (10:12 -0500)
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

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;