[Ricardo RodrÃguez] wrote:
I think your idea makes sense, but it is not
implemented in the way
XWiki works by default. At least working with XE. Nevertheless, there is
methods allowing you to do this for any entry you could find there. For
instance:
This code coming from the Bulletin Application side column panel check
if the current user has view rights in an item before showing it:
#if($xwiki.getDocument($item).hasAccessLevel('view', $context.user)
== 'true')
#if ($xwiki.getDocument($item).getValue('bbtitle') != "")
* [$xwiki.getDocument($item).display('bbtitle')>$item]
#else
* [$item]
#end
#end
In another wiki I've modified a copy of the menuview.vm macro put in its
customized skin folder to be shown only to administrators. Simply add
the same Velocity conditional structure #if/#end:
#if($context.getMode()==0)## Visible only in a page
#if ($xwiki.hasAdminRights())
****actual code****
#end
#end
Hope this helps,
Ricardo
Hi Ricardo
That sounds good. Does anybody mind if I make a JIRA entry (improvements) as
I would like to see that feature in the default wiki?
Nobody will get upset, the worst that could happen is that it will not
be implemented as soon as you'd like.
--
Sergiu Dumitriu