Skip to content

Commit

Permalink
Allow users to push to external service when the case is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
georgianaonoleata1904 committed Oct 29, 2024
1 parent a904803 commit 60f3df5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export interface ReturnUsePushToService {

export const usePushToService = ({
caseId,
caseStatus,
caseConnectors,
connector,
isValidConnector,
Expand Down Expand Up @@ -108,14 +107,9 @@ export const usePushToService = ({
return [getDeletedConnectorError()];
}

if (caseStatus === CaseStatuses.closed) {
return [getCaseClosedInfo()];
}

return errors;
}, [
actionLicense,
caseStatus,
connector.id,
hasLicenseError,
isValidConnector,
Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugins/cases/server/client/cases/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ export const push = async (
operation: Operations.pushCase,
});

if (theCase?.status === CaseStatuses.closed) {
throw Boom.conflict(
`The ${theCase.title} case is closed. Pushing a closed case is not allowed.`
);
}

const alertsInfo = getAlertInfoFromComments(theCase?.comments);
const alerts = await getAlerts(alertsInfo, clientArgs);
const profiles = await getProfiles(theCase, securityStartPlugin);
Expand Down

0 comments on commit 60f3df5

Please sign in to comment.