LiftRules.setSiteMap(new SiteMap(List({ case r =>
If(() => r match {
case Full(Req("user_mgt" :: _, _, _)) => true
case _ => User.loggedIn_?
}, RedirectResponse("/user_mgt/login"))
}), entries:_*))
I wonder if there is a more efficient to use Groups and LocParams though.
- Mahmood
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
SiteMap has a globalParamFunc parameter where you can insert a global
LocParam. I have the following snippet work for me:
LiftRules.setSiteMap(new SiteMap(List({ case r =>
If(() => r match {
case Full(Req("user_mgt" :: _, _, _)) => true
case _ => User.loggedIn_?
}, RedirectResponse("/user_mgt/login"))
}), entries:_*))
I wonder if there is a more efficient to use Groups and LocParams though.
- Mahmood
On Tue, Apr 26, 2011 at 6:39 PM, Noah Nordrum <nnor...@ideafidelity.com> wrote:
> I'm assuming that most people here are developing apps that require
> security on the VAST majority of their pages, and I was wondering if
> there was a relatively simple way to default to requires login (def
> MustBeLoggedIn = If(() => User.loggedIn_?, () =>
> RedirectResponse(User.loginPageURL)), or whatever), and just flag the
> Menu items that don't require login.
>
> Thanks!
>
> Noah
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.