Hello,
My application is supposed to have a "presentation mode" that disables
editing capabilities on content. To implement that, I thought I could open
the document with a parameter in the link, and add a Sling filter on pages
to detect this parameter either in the URL or in the user's session (where
the filter puts it when first detected in the URL).
I thought I could then wrap my resource in a ResourceWrapper, that would
add an "isModifiable" getter that I could use on views to enable/disable
edition capabilities, as this status also depends on locks and write
privileges.
I've written the filter and the wrappers and it seems to work well,
debugging mode shows that it's going through. However, in the JSP
displaying the page resource, ${resource} is actually a JcrNodeResource and
${slingRequest} is a OnDemandReaderRequest.
I do not find where these wrappers re set, and I'm wondering now if my idea
is good and possible to implement. Would you have any tips on how to use my
own wrapper to add information to the displayed resource?
I'm using Sling 7 and I've upgraded Sling engine to 2.4.0.
Thank you for your help.
Regards,
Guillaume