Permissions of custom sub menus aren't respected
Submitted Hatsu, Apr 04 2012 02:12 PM | Last updated Sep 12 2012 05:45 AM
If I create a new menu with submenus the custom permissions aren't respected. All sub menu points are shown.
What is more is, the "Show to everyone" is always checked after saving.
What is more is, the "Show to everyone" is always checked after saving.
| Status: | Fixed |
| Version: | 2.3.1 |
| Fixed In: | 2.3.2 |











3 Comments
In the tab you set who CAN'T see it.. Then, in the submenus, we turn around and set who CAN see it.. That.. Should probably be consistent?
My fix for the above, in primary_navigation, I changed
<li class='submenu_li'><a href='{$submenuItem['menu_url']}' title='{$submenuItem['menu_description']}' {$submenuItem['menu_attributes']}>{$submenuItem['menu_title']}</a></li>In two places, to
<if test="!$submenuItem['menu_permissions'] OR IPSMember::isInGroup( $this->memberData, explode( ',', $submenuItem['menu_permissions'] ), false )"> <li class='submenu_li'><a href='{$submenuItem['menu_url']}' title='{$submenuItem['menu_description']}' {$submenuItem['menu_attributes']}>{$submenuItem['menu_title']}</a></li> </if>That addresses the 'no permissions applied, everyone can see', but, does nothing for the backwardsness or the box always being checked.
http://community.inv...y-groups-r38977
Also hide from group is not appropriate for menus..Its better to be inclusive rather than exclusive. Main reason is that every time you create a new menu you will have to exclude it from all menus..Not very tidy and open for mistake...