I try to include content of a page into another one. The content have to be rendered in context of the sourcepage because of relative references of the content.
I testing with the display macro an the context macro + include macro successfully.
But both macros doing authorization checks for view permission on the author of the target page. In my scenario this is a unlucky behaviour, because if the authors rights changes or the authors user is removed, the content of the included page can not longer be viewed.
So I’m locking for a solution to avoid the right check at all, or checking the rights of the viewers instead of the author?
Does someone have an idea how to achieve this, maybe in velocity?
Note that by doing this you’re introducing some security vulnerability in your wiki.
Also note that you’re depending on non-public APIs (you have some imports of org.xwiki.*.internal packages) and thus your code may be broken at any point in time in the future (basically it can happen when if/when ContextMacroDocument changes).