How to reproduce:
- Deny view access right to guest users
- Connect to the office server
- Attach a presentation to a wiki page
- Click on the eye icon near the attached presentation
The image gallery appears but the slide images are not loaded.
The reason is because the temporary resource handler doesn't initialize the XWiki context so the ContextualAuthorizationManager uses the null user reference (guest user reference) to check access rights.