Hiding menu item when logged in (Orchard 1.6)

Topics: Troubleshooting
Feb 27, 2013 at 8:15 AM
Hi there,

I'm using the content permission module on a custom link menu item to try and hide it when a user is logged in.

In the menu I have two custom link items, a "My Pages" item and a "Login" item, the "My Pages" I successfully hide from non authenticated users by removing the view permission for "Anonymous" users. However when I try to do the reverse and remove view rights for everybody but "Anonymous" users to hide it after someone logs in, it does not seem to work.

I've looked in the security code, like for example the code pointed out in the following http://orchard.codeplex.com/discussions/395052 post, but I just can't make any sense of it.

Any thoughts or advice on this would be most appreciated.

Cheers.
Ola
Feb 27, 2013 at 8:55 PM
Just a though: assign your users a role an hide this menu for this role ?
Feb 28, 2013 at 9:31 AM
Edited Feb 28, 2013 at 9:32 AM
According to someone on SteckOverflow [http://stackoverflow.com/questions/15108048/how-to-hide-a-menu-item-when-logged-in-in-orchard-1-6], the permissions, don't get applied to custom item links.
So at least for now I'll just create separate menus for logged in and not logged in users and hide/show them with widget layers.

CSADNT wrote:
Just a though: assign your users a role an hide this menu for this role ?