Skip to content

Commit

Permalink
fix: show all projects to org update users (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbh authored Dec 13, 2023
1 parent 5f0a6af commit 924c9a8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function WorkspaceProjects() {
resource
},
{
permission: PERMISSIONS.PolicyManagePermission,
permission: PERMISSIONS.UpdatePermission,
resource
}
],
Expand All @@ -62,15 +62,15 @@ export default function WorkspaceProjects() {
!!organization?.id
);

const { canCreateProject, canManagePolicy } = useMemo(() => {
const { canCreateProject, canUpdateOrganization } = useMemo(() => {
return {
canCreateProject: shouldShowComponent(
permissions,
`${PERMISSIONS.ProjectCreatePermission}::${resource}`
),
canManagePolicy: shouldShowComponent(
canUpdateOrganization: shouldShowComponent(
permissions,
`${PERMISSIONS.PolicyManagePermission}::${resource}`
`${PERMISSIONS.UpdatePermission}::${resource}`
)
};
}, [permissions, resource]);
Expand Down Expand Up @@ -105,7 +105,7 @@ export default function WorkspaceProjects() {
canCreateProject={canCreateProject}
userAccessOnProject={userAccessOnProject}
onOrgProjectsFilterChange={onOrgProjectsFilterChange}
canListOrgProjects={canManagePolicy}
canListOrgProjects={canUpdateOrganization}
/>
</Flex>
</Flex>
Expand Down

0 comments on commit 924c9a8

Please sign in to comment.