Skip to content

Commit

Permalink
Merge branch 'master' into feature/clean_up_api
Browse files Browse the repository at this point in the history
  • Loading branch information
notshivansh committed Jan 3, 2025
2 parents 367d4b6 + a873dd1 commit 4a55971
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
IMAGE_TAG: ${{ steps.docker_tag.outputs.IMAGE_TAG }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const Users = () => {
const [usersCollection, setUsersCollection] = useState([])
const [roleHierarchy, setRoleHierarchy] = useState([])
const [allCollections, setAllCollections] = useState([])
let rbacAccess = func.checkForRbacFeature();
let rbacAccess = func.checkForRbacFeatureBasic();
let rbacAccessAdvanced = func.checkForRbacFeature()

const collectionsMap = PersistStore(state => state.collectionsMap)

Expand Down Expand Up @@ -319,7 +320,7 @@ const Users = () => {
{
content: (
<HorizontalStack gap={4}>
{ (role === 'ADMIN' || userRole !== 'ADMIN' || !rbacAccess) ? undefined :
{ (role === 'ADMIN' || userRole !== 'ADMIN' || !rbacAccessAdvanced) ? undefined :
<ResourceListModal
title={"Collection list"}
activatorPlaceaholder={`${(usersCollection[id] || []).length} collections accessible`}
Expand Down
12 changes: 11 additions & 1 deletion apps/dashboard/web/polaris_web/web/src/util/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,16 @@ showConfirmationModal(modalContent, primaryActionContent, primaryAction) {
}
return false;
},
checkForRbacFeatureBasic(){
const stiggFeatures = window.STIGG_FEATURE_WISE_ALLOWED
let rbacAccess = false;
if (!stiggFeatures || Object.keys(stiggFeatures).length === 0) {
rbacAccess = true
} else if(stiggFeatures && stiggFeatures['RBAC_BASIC']){
rbacAccess = stiggFeatures['RBAC_BASIC'].isGranted
}
return rbacAccess;
},
checkForRbacFeature(){
const stiggFeatures = window.STIGG_FEATURE_WISE_ALLOWED
let rbacAccess = false;
Expand All @@ -1657,7 +1667,7 @@ showConfirmationModal(modalContent, primaryActionContent, primaryAction) {
return rbacAccess;
},
checkUserValidForIntegrations(){
const rbacAccess = this.checkForRbacFeature();
const rbacAccess = this.checkForRbacFeatureBasic();
if(!rbacAccess){
return true;
}
Expand Down

0 comments on commit 4a55971

Please sign in to comment.