From 924c9a82fe32689e8b1d9a36baed990ca8100e58 Mon Sep 17 00:00:00 2001 From: Rishabh Mishra Date: Wed, 13 Dec 2023 12:53:04 +0530 Subject: [PATCH] fix: show all projects to org update users (#433) --- .../react/components/organization/project/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdks/js/packages/core/react/components/organization/project/index.tsx b/sdks/js/packages/core/react/components/organization/project/index.tsx index 85ef3f115..41f7f590a 100644 --- a/sdks/js/packages/core/react/components/organization/project/index.tsx +++ b/sdks/js/packages/core/react/components/organization/project/index.tsx @@ -50,7 +50,7 @@ export default function WorkspaceProjects() { resource }, { - permission: PERMISSIONS.PolicyManagePermission, + permission: PERMISSIONS.UpdatePermission, resource } ], @@ -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]); @@ -105,7 +105,7 @@ export default function WorkspaceProjects() { canCreateProject={canCreateProject} userAccessOnProject={userAccessOnProject} onOrgProjectsFilterChange={onOrgProjectsFilterChange} - canListOrgProjects={canManagePolicy} + canListOrgProjects={canUpdateOrganization} />