From 9c23986aad9a3b0ea248fc9709a6435f76321c5b Mon Sep 17 00:00:00 2001 From: Arnab Dutta Date: Thu, 7 Jul 2022 18:32:35 +0530 Subject: [PATCH] fix: block user without proper roles #277 --- admin-ui/app/utils/AppAuthProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-ui/app/utils/AppAuthProvider.js b/admin-ui/app/utils/AppAuthProvider.js index 89da7b150..dd6956781 100755 --- a/admin-ui/app/utils/AppAuthProvider.js +++ b/admin-ui/app/utils/AppAuthProvider.js @@ -92,7 +92,7 @@ export default function AppAuthProvider(props) { setShowContent(false) return null } else { - if (userinfo.jansAdminUIRole || userinfo.length === 0) { + if (!userinfo.jansAdminUIRole || userinfo.jansAdminUIRole.length == 0) { setShowContent(false) setRoleNotFound(true) alert('The logged-in user do not have valid role. Logging out of Admin UI')