From: Chris Sharp Date: Thu, 19 Jan 2023 15:44:19 +0000 (-0500) Subject: attempted fix of null token perm calls X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=54738e6d27adf77f4868ba4d5b1f7f586a7781b0;p=evergreen%2Fpines.git attempted fix of null token perm calls --- 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.