SessionVars are not available during URL rewriting. URL rewriting takes place before the session is obtained. This is deliberate because the URL rewriting takes place before the sessionless dispatch is consulted. This happens before the session is retrieved/created and the regular flow happens.
Access control on an HTML page level should be done in SiteMap. On Tue, Oct 21, 2008 at 1:00 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote: > I could have sworn this had been covered recently on the list but I can't > seem to find it. I'd like to have a rewrite function that checks to see if > someone is logged in and in the proper role before allowing them to get to > the page. I had wanted to do this using LiftRules.addRewriteBefore combined > with two SessionVars that would hold the user name and their roles (if > logged in). Unfortunately, it looks like SessionVars don't seem to be usable > inside the rewrite function because the LiftSession hasn't been set up yet > at that point. I'm I missing something obvious, or does anyone have some > suggestions for doing it in a different/better way? > > Thanks, > > Derek > > > > -- Lift, the simply functional web framework http://liftweb.net Collaborative Task Management http://much4.us Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---