public function denyTeamAction($envId, $teamId)
{
if (!$this->getUser()->canManageAcl()) {
throw new ApiInsufficientPermissionsException();
}
$this->getEnv($envId);
$team = Account\TeamEnvs::findOne([['envId' => $envId], ['teamId' => $teamId]]);
if (empty($team)) {
throw new ApiErrorException(404, ErrorMessage::ERR_OBJECT_NOT_FOUND, "Team '{$teamId}' has no access to environment '{$envId}'");
}
$team->delete();
return $this->result(null);
}