"Neil.Lv" <[email protected]> writes:

> Hi all,
>
>    I have a question about the Loc , and How to hidden the Menu if the
> user is not a superuser ?
>
>    The code is :
>      The Edit book 1 always shows in the home page if the user doesn't
> login.
>      The Edit book 2 doesn't work both login in or not .
> ###
>   val IfLoggedIn = If(() => User.currentUser.isDefined, "You must be
> logged in")

Hidden says it should always be hidden (ie the url works, but not shown
in the menu)

The easiest way is to hide an item if the logged in user is not the
super user is: 

  Menu(Loc("addBk2", List("edit_book"), "Edit book 2",
  User.testSuperUser))

/Jeppe


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to