[xwiki-notifications] [Issue] Created: (XWIKI-1742) #displaypanel($panel) does not work!
sunny (JIRA)
jira at xwiki.org
Thu Sep 13 11:35:15 CEST 2007
#displaypanel($panel) does not work!
------------------------------------
Key: XWIKI-1742
URL: http://jira.xwiki.org/jira/browse/XWIKI-1742
Project: XWiki Platform
Issue Type: Bug
Affects Versions: 1.2 M1
Reporter: sunny
In netcipia, the phenomenon is that all panels in place cannot be shown in public page visited without login. The detail description as follows:
1 If the current place is test.netcipia.net, in this place, I quote the panel Welcome. ($panel="xwiki:Panels.Welcome")
2 In netcipia site, I set the privilege to view of xwiki:Panels.Welcome.
3 If I quote $xwiki.hasAccessLevel("view",$context.user,"xwiki:Panels.Welcome") in vm file of this public page, the value is true. ($context.user="XWiki.XWikiGuest")
However, if I quote the $xwiki.getDocument("xwiki:Panels.Welcome"), the value is null.
So, we analyze the xwiki code. In the 108 and 109 lines of com.xpn.xwiki.api.XWiki.getDocument(fullname), we find the doc.getFullName()="Panels.Welcome". Therefore, the value judged here is "test:Panels.Welcome", not "xwiki:Panels.Welcome". So the result of line 108 and 109 is false. Then, we cannot get the value in $xwiki.getDocument("xwiki:Panels.Welcome").
Because of these reason, we modify doc.getFullName() to the fullname of parameter which will be transfered. But, the error appears as I view the page.
[The code of 108-109 is xwiki.getRightService().hasAccessLevel("view", getXWikiContext().getUser(), doc.getFullName(), getXWikiContext())]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the notifications
mailing list