From 54738e6d27adf77f4868ba4d5b1f7f586a7781b0 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Thu, 19 Jan 2023 10:44:19 -0500 Subject: [PATCH] attempted fix of null token perm calls --- Open-ILS/web/js/ui/default/staff/services/auth.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/web/js/ui/default/staff/services/auth.js b/Open-ILS/web/js/ui/default/staff/services/auth.js index 358c036c9a..e1bb7e8f29 100644 --- a/Open-ILS/web/js/ui/default/staff/services/auth.js +++ b/Open-ILS/web/js/ui/default/staff/services/auth.js @@ -402,6 +402,10 @@ function($q , egNet , egAuth , egOrg) { isArray = false; permList = [permList]; } + // some calls are getting this far without a valid auth token + if (!egAuth.token || egAuth.token() === null) { + return null; + } // as called, this method will return the top-most org unit of the // sub-tree at which this user has the selected permission. // From there, flesh the descendant orgs locally. -- 2.11.0