Skip to content

Commit

Permalink
feat: hide features with permissions until fully implemented
Browse files Browse the repository at this point in the history
fix: fetch options object
  • Loading branch information
gwynndp committed Jun 20, 2022
1 parent 0c46ec5 commit ad67e5e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/context/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@ function getRoutes(user) {
component: Stakeholder,
icon: AccountTreeIcon,
//TODO this is temporary, need to add stakeholders policy
// disabled: false,
disabled:
process.env.REACT_APP_ENABLE_STAKEHOLDERS !== 'true' ||
!hasPermission(user, [
POLICIES.SUPER_PERMISSION,
POLICIES.APPROVE_TREE,
POLICIES.LIST_STAKEHOLDERS,
POLICIES.MANAGE_STAKEHOLDERS,
// Need APPROVE_TREE and to remove lines 132 & 133 until new policies implemented
]) ||
!user ||
user.policy.organization !== undefined,
// POLICIES.LIST_STAKEHOLDERS,
// POLICIES.MANAGE_STAKEHOLDERS,
/* Need APPROVE_TREE and to remove lines 139 & 140 until new policies implemented */
]),
// ||
// !user ||
// user.policy.organization !== undefined,
},
{
name: 'Settings',
Expand Down

0 comments on commit ad67e5e

Please sign in to comment.