diff --git a/frontend/src/component/environments/EnvironmentList/EnvironmentListItem/EnvironmentListItem.tsx b/frontend/src/component/environments/EnvironmentList/EnvironmentListItem/EnvironmentListItem.tsx index cfcfa6742f..bd177ebdef 100644 --- a/frontend/src/component/environments/EnvironmentList/EnvironmentListItem/EnvironmentListItem.tsx +++ b/frontend/src/component/environments/EnvironmentList/EnvironmentListItem/EnvironmentListItem.tsx @@ -110,11 +110,15 @@ const EnvironmentListItem = ({ }); const opacity = isDragging ? 0 : 1; - drag(drop(ref)); const { hasAccess } = useContext(AccessContext); + const updatePermission = hasAccess(UPDATE_ENVIRONMENT); const tooltipText = env.enabled ? 'Disable' : 'Enable'; + if (updatePermission) { + drag(drop(ref)); + } + return ( } /> - - - - - - + + + + + } + /> +