Details
-
Bug
-
Resolution: Fixed
-
Major
-
10.5
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Or any other use case where the executed code is not located in the context document content.
api.XWiki.getEffectiveScriptAuthorName() returns the author of the current document instead of using the author reference given in the context.
As a result, calling xwiki.getDocumentAsAuthor() in a template from a thread (without any current document) badly fallback to the author of a stub document (the current document) and finally returned the document only if guest user has the right to see it.
Note that context.getAuthorReference() returned the accurate value (superadmin in the case of a template of the file system) and that we should rely on it.
Attachments
Issue Links
- relates to
-
XWIKI-15034 Live email notification not showing up correctly when restricting permissions to unregistered users
- Closed