As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I have uploaded a document in Nuxeo and got a link. I can download my document accessing that link. Now, I trashed my document and got "isTrashed": true as well but still I can download my document using the link which is generated by Nuxeo. Is there any way by which I can restrict access to that URL after a document is trashed?
Hello,
Settting a document to trash only update the ecm:isTrashed propertty value but doesn't have an impact on the URL. This allows you to easily untrash a documentt (and consequenttly, not ot regenerate an URL). For this use case, it probably needs to implement a custom secutiry policy (https://doc.nuxeo.com/nxdoc/security-policy-service/ ).
ecm:isTrashed
With something like this in your checkPermission method:
checkPermission
Boolean isTrashed = Optional.ofNullable((Boolean) doc.getValue("ecm:isTrashed")) .orElse(Boolean.FALSE); if (isTrashed) { return Access.DENY; } else { return Access.UNKNOWN }
Hi. I think you wanted to put "isConfidential" in the "if" condition; or to call the Boolean "isTrashed"! Regards.
Indeed! Updated