Skip to content

Commit

Permalink
Merge pull request #1380 from akto-api-security/hotfix/fix_logs_blocking
Browse files Browse the repository at this point in the history
Fixing logs api call
  • Loading branch information
avneesh-akto authored Aug 21, 2024
2 parents 6839c95 + 90dd9ea commit ecc21d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ const Users = () => {
const [loading, setLoading] = useState(false)
const [users, setUsers] = useState([])
const [roleHierarchy, setRoleHierarchy] = useState([])
const stiggFeatures = window.STIGG_FEATURE_WISE_ALLOWED
let rbacAccess = false;

if (!stiggFeatures || Object.keys(stiggFeatures).length === 0) {
rbacAccess = true
} else if(stiggFeatures && stiggFeatures['RBAC_FEATURE']){
rbacAccess = stiggFeatures['RBAC_FEATURE'].isGranted
}
const rbacAccess = func.checkForRbacFeature();

const [roleSelectionPopup, setRoleSelectionPopup] = useState({})

Expand Down
14 changes: 14 additions & 0 deletions apps/dashboard/web/polaris_web/web/src/util/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,21 @@ showConfirmationModal(modalContent, primaryActionContent, primaryAction) {
}
return false;
},
checkForRbacFeature(){
const stiggFeatures = window.STIGG_FEATURE_WISE_ALLOWED
let rbacAccess = false;
if (!stiggFeatures || Object.keys(stiggFeatures).length === 0) {
rbacAccess = true
} else if(stiggFeatures && stiggFeatures['RBAC_FEATURE']){
rbacAccess = stiggFeatures['RBAC_FEATURE'].isGranted
}
return rbacAccess;
},
checkUserValidForIntegrations(){
const rbacAccess = this.checkForRbacFeature();
if(!rbacAccess){
return true;
}
const userRole = window.USER_ROLE
return !(userRole === "GUEST" || userRole === "MEMBER")
},
Expand Down

0 comments on commit ecc21d9

Please sign in to comment.