LP#1990306: Also check for authtoken at the auth service level
authorChris Sharp <csharp@georgialibraries.org>
Fri, 27 Jan 2023 20:40:31 +0000 (15:40 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 10 Feb 2023 15:12:47 +0000 (10:12 -0500)
Thank you to Bill Erickson and Jason Stephenson for assistance with this.

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/services/auth.js

index 358c036..04ff9d6 100644 (file)
@@ -396,6 +396,7 @@ function($q , egNet , egAuth , egOrg) {
      * org list for the requested perm.
      */
     service.hasPermAt = function(permList, asId) {
+        if (!egAuth.token()) { return $q.when([]) };
         var deferred = $q.defer();
         var isArray = true;
         if (!angular.isArray(permList)) {