public function deleteAction($envId)
{
if (!$this->getUser()->isAccountSuperAdmin() && !$this->getUser()->isAccountOwner()) {
throw new ApiErrorException(403, ErrorMessage::ERR_PERMISSION_VIOLATION, "Insufficient Permissions");
}
$env = $this->getEnv($envId);
try {
$env->delete();
} catch (ObjectInUseException $e) {
throw new ApiErrorException(409, ErrorMessage::ERR_OBJECT_IN_USE, $e->getMessage(), $e->getCode(), $e);
}
return $this->result(null);
}