From fd6748d217e4dbdd64e5260581c4ccb7125cbb24 Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Tue, 21 Apr 2015 13:07:58 +0000
Subject: [PATCH] fix variable typo for authorization principal role

---
 .../dm/common/service/auth/authorizationPrincipalRetriever.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/python/dm/common/service/auth/authorizationPrincipalRetriever.py b/src/python/dm/common/service/auth/authorizationPrincipalRetriever.py
index a7df5826..139a02d8 100755
--- a/src/python/dm/common/service/auth/authorizationPrincipalRetriever.py
+++ b/src/python/dm/common/service/auth/authorizationPrincipalRetriever.py
@@ -25,7 +25,7 @@ class AuthorizationPrincipalRetriever:
         userInfo = principal.getUserInfo()
         if userInfo is None:
             return
-        for userSystemRoleName in user.get('userSystemRoleNameList', []):
+        for userSystemRoleName in userInfo.get('userSystemRoleNameList', []):
             if userSystemRoleName == self.adminRoleName:
                 principal.setRole(dmRole.DM_ADMIN_ROLE)
 
-- 
GitLab