Jump to content


Photo

Permissions of custom sub menus aren't respected


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.

Status: Fixed
Version: 2.3.1
Fixed In: 2.3.2


3 Comments

And a third maybe bug with this.. The permissions are the complete opposite of what you set above.. I'm moving this back to unfiled, just so that's known..

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.
Reversed the permissions so they are "hide from group"
another realted propably problem:

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...