Skip to content

Commit

Permalink
fix: block user without proper roles #277
Browse files Browse the repository at this point in the history
  • Loading branch information
duttarnab committed Jul 7, 2022
1 parent 2cfe055 commit 9c23986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin-ui/app/utils/AppAuthProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 9c23986

Please sign in to comment.