On 02/28/2014 07:11 PM, DeHaynes wrote: > I fixed it by modifying the code in Menu.MenuMacro. I wrapped it in an > if($isGuest) like this. > > {{velocity}} > #if ($isGuest) > #else > #set ($id = $xcontext.macro.params.id) > #set ($type = $xcontext.macro.params.type) > #set ($colorTheme = $xwiki.getUserPreference('colorTheme')) > #if ("$!colorTheme" != '') > ## Make sure we use an absolute reference (see XWIKI-9672) > #set ($colorTheme = $services.model.resolveDocument($colorTheme, > $doc.documentReference)) > #end > #set ($discard = $xwiki.ssx.use("$xcontext.macro.doc.prefixedFullName", > {'colorTheme': $colorTheme})) > #set ($discard = $xwiki.jsx.use("$xcontext.macro.doc.prefixedFullName")) > (% #if ("$!id" != '') id="$id"#end class="menu menu-$!type" %)((( > $xcontext.macro.content > ))) > #end > {{/velocity}} > > Sorry, I don't know the scripting language well enough to do a ($isGuest) == > false. >
#if (!$isGuest) should do the trick :) A slightly better check might be to see if the current user (who ever this is) has view rights on the document to be included, via $xwiki.hasAccessLevel('view', $xcontext.userReference, <insert page ref here>) But this seems to be in a different place, (and I have to admit I do not know the menu extension good enough to know where it is). _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users