Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
3.4
-
Unknown
-
Description
Follow this steps to reproduce:
- Create a page that needs programming rights, e.g.:
{{velocity}} $doc.document {{/velocity}}
- Create another page using the previous page as template:
/xwiki/bin/edit/Spage/NewPage?editor=inline&template=Spage.PageTemplate
The code from the template is not evaluated even if the current user has programming rights. Is this by design? The code says no, because debugging the rights service implementation reveals that:
- the new document doesn't have the content author set (which is used to assert the programming rights); the content author is set only after the document is saved; moreover the content author is not null but the empty string
- the method that asserts programming rights checks for null content author but since the content author is the empty string, it ends up asserting programming rights on "xwiki:XWiki.xwiki:" user which is clearly a bug.