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.
Hi people I need to take the title of a document using java code even when the user doesn't have permission to see it.Can someone tell me if this is possible?
Use a privileged session:
DocumentRef ref = doc.getRef(); String title = CoreInstance.doPrivileged(doc.getCoreSession(), (CoreSession privilegedSession) -> (String) privilegedSession.getDocument(ref).getPropertyValue("dc:title") );
It's equivalent but UnrestrictedSessionRunner is more verbose.
Thank you Florent,but i found another way using UnrestrictedSessionRunner.I think this is better because i have to iterate through the parents of a document too.