It's never that black or white. I think the onus should be to disclose as much as possible to formal legal processes like the police and the courts, but there may always be cases where redaction is appropriate.
We're having a discussion now about the divulgation of documents involving Chinese intelligence activities within Canada. It would be a very bad idea to simply turn over all the documentation without redaction.