kibana/x-pack/test/api_integration/apis/cases
Kevin Qualters 1c3bceacc0
[Cases] Fix an issue with the reopen case permission, add integration tests for failing case (#201517)
## Summary

Currently, the partitionPatchRequest in
x-pack/plugins/cases/server/client/cases/bulk_update.ts will not check a
case properly if a case is being re-opened, instead of an else if in the
loop comparing cases to cases in the request, the status logic should be
outside of this set of if statements. If a case is being re-opened, the
final else is never run, and casesToAuthorize is 0. This results in
ensureAuthorized being called with an empty array of entities, and so
the check always succeeds. To fix this, reopenedCases is still populated
in the same loop, just not when casesToAuthorize logic is running as
well. Also adds some missing tests for this and the create comment
permission as requested in
https://github.com/elastic/kibana/pull/194898.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-11-25 05:12:43 -06:00
..
common [Cases] Fix an issue with the reopen case permission, add integration tests for failing case (#201517) 2024-11-25 05:12:43 -06:00
bulk_get_user_profiles.ts
config.ts [ftr] split x-pack api integration tests based on plugin (#150837) 2023-02-13 15:06:11 +00:00
files.ts [Files] correct for anomalies in content disposition value for file downloads (#176822) 2024-02-19 08:50:00 -07:00
index.ts [Cases] Integrating file service and registering file kinds (#152031) 2023-03-02 07:35:03 -05:00
privileges.ts [Cases] Fix an issue with the reopen case permission, add integration tests for failing case (#201517) 2024-11-25 05:12:43 -06:00
suggest_user_profiles.ts [Cases] Total users returned by suggested users API (#161329) 2023-07-07 15:53:59 +02:00