[Typo3] CURIFSUB - hiding access restricted (hidden) menu items ???
Rainer (Rene) Suthoelder
t3 at boswel-remove-me.de
Mon Jan 31 18:01:05 CET 2005
hi!
i was wondering if anyone of you has experienced the same with the CURIFSUB
function:
if you use the suggested CURIFSUB script (to generate menus with icons
indicating sub-menus) from a prevoius post in this list
<?php
function user_curifsub($menuArr,$conf) {
while(list($k,$v)=each($menuArr)) {
if ($conf["parentObj"]->isItemState("IFSUB",$k) &&
$conf["parentObj"]->isItemState("CUR",$k))
$menuArr[$k]["ITEM_STATE"]="USERDEF1";
}
return $menuArr;
}
?>
the different item menu states get rendered properly, but if you have access
restricted (hidden) menu subitems, they are also detected and the menu shows
the "click to drill deeper" item state.
i think that you would expect this behavour _only_ if you are a member of a
group which has appropriate access-rights, all others should not be able to
see hidden menu-tree.
so my question:
is there a way to add another AND statement within this line
if ($conf["parentObj"]->isItemState("IFSUB",$k) &&
$conf["parentObj"]->isItemState("CUR",$k))
i.e. something like (in plain words)
... && user_has_access_rights_for_sub_tree))
or perhaps someone has another solution for this scenario?
greets,
rainer
More information about the TYPO3-english
mailing list