[Lift] Re: Best method to protect most menu items?

2009-06-24 Thread Jeppe Nejsum Madsen
On 23 Jun 2009, David Pollak wrote: Jeppe, I just checked in code (it'll take 45 minutes to hit the Maven repo) that has global LocParams for each SiteMap. The SiteMap constructor is now: SiteMap(globalParamFuncs: List[PartialFunction[Box[Req], Loc.LocParam]], kids: Menu*) You can put

[Lift] Re: Best method to protect most menu items?

2009-06-24 Thread David Pollak
On Wed, Jun 24, 2009 at 12:58 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: On 23 Jun 2009, David Pollak wrote: Jeppe, I just checked in code (it'll take 45 minutes to hit the Maven repo) that has global LocParams for each SiteMap. The SiteMap constructor is now:

[Lift] Re: Best method to protect most menu items?

2009-06-24 Thread Jeppe Nejsum Madsen
On Wed, Jun 24, 2009 at 3:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Oh... I get why you did the Hidden thing... I'd do the following: case Full(Req(path, _, _)) if !User.loggedIn_? path != List(profile, login)  path != path != List(profile, lost_password) =

[Lift] Re: Best method to protect most menu items?

2009-06-24 Thread David Pollak
On Wed, Jun 24, 2009 at 7:49 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: On Wed, Jun 24, 2009 at 3:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Oh... I get why you did the Hidden thing... I'd do the following: case Full(Req(path, _, _)) if !User.loggedIn_? path !=

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread David Pollak
I'll enhance sitemap to support global additions of parameters. On Tue, Jun 23, 2009 at 1:21 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Our app is private, which means only the signin and related pages are visible without authentication. I've made this Loc to protect menu items,

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread Jeppe Nejsum Madsen
On 23 Jun 2009, David Pollak wrote: I'll enhance sitemap to support global additions of parameters. Cool. Looking forward to this :-) Just out of curiosity: Is it possible to fall through in a DispatchPF, ie. do the default processing, even if the function is defined at the request? /Jeppe

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread David Pollak
Jeppe, I just checked in code (it'll take 45 minutes to hit the Maven repo) that has global LocParams for each SiteMap. The SiteMap constructor is now: SiteMap(globalParamFuncs: List[PartialFunction[Box[Req], Loc.LocParam]], kids: Menu*) You can put your Redirect stuff in like: List({ case _