Skip to content

Commit

Permalink
fix: revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Jan 18, 2024
1 parent c978693 commit b80f0e9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/screens/HyperSwitch/UserManagement/PermissionUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,11 @@ let mapStringToPermissionType = val => {
}
}

let getAccessValue = (~permissionValue: array<permissionType>, ~permissionList) => {
let getAccessValue = (~permissionValue: permissionType, permissionList) => {
open AuthTypes
let isPermissionFound =
permissionValue
->Array.filter(permission => {
permissionList->Array.includes(permission)
})
->Array.length > 0
isPermissionFound ? Access : NoAccess
let isPermissionFound = permissionList->Array.find(ele => {
ele === permissionValue
})

isPermissionFound->Option.isSome ? Access : NoAccess
}

0 comments on commit b80f0e9

Please sign in to comment.