On Feb 18, 2008, at 4:38 PM, Sergiu Dumitriu wrote:
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Guillaume Lerouge wrote:
Hi,
have you tried something akin to
#if ($context.user == 'XWiki.YourUserName') Test #end
?
Nope. And it perfectly works! Thanks.
Given an user with this it is possible to control if a paragraph appears or not but a new doubt arises from here. Look at this...
#toc("2" "3" "")
#if ($xwiki.hasAdminRights()) 1.1 Entry 1 1.1 Entry 2 #end
#if ($context.user == 'XWiki.MyUsername') 1.1 Entry 3 #end
Only Entry 1 and 2 are show in the document for an admin other than MyUsername, but all three entries appear in the TOC.
Is it possible to control this? Thanks again!
Not now. The TOC macro is implemented in a wrong way, and it has many issues. I have an idea about how it should work, but I don't have time for this right now.
BTW this will be fixed when we finish implementing the new rendering component. -Vincent