David Pollak <feeder.of.the.be...@gmail.com> writes:

>  http://localhost:8080/assets/edit/5817, an anonymous
>> user is not redirected to the login page (at least, not before
>> findForParam is called)
>>
>> Any clues?
>>
>
> SiteMap is applied after URL rewriting.  URL rewriting happens very, very
> early in the HTTP service cycle.  We don't know what the URL is and how it
> should be applied before the rewrite.

I had a feeling this was the case. I seem to run into this a lot with
CRUDify ;-(

> If the CRUDify page is actually displayed, this is a bug.  But the
> findForParam method will be invoked because this is part of URL rewriting.

The crudify page is not displayed. If I fix my findForParam to work
without the logged in user I have two solutions the way I see it:

1) If I do 

find(By(id,in.toInt),By(account,
User.currentUser.dmap(0L)(_.account.is)))

I will of course not find the record since account is 0. This gives a
404, so doesn't really work

2) If I do 

User.currentUser.dmap(Full(new Vehicle):Box[Vehicle])(acc =>
find(By(id,in.toInt),By(account, acc.account.is)))

it seems to work by returning a default Vehicle in the anonymous
case. This seems to work as long as the creation doesn't have any side
effects. Conceptually not so nice, but gets the job done...

The only  description of the Lift request lifecycle I've found is this:
http://wiki.liftweb.net/index.php/How_lift_processes_HTTP_requests. Is
this up to date?

I'm not sure how much of the Lift machinery is available during the
different stages, is this described somewhere?

/Jeppe


--~--~---------~--~----~------------~-------~--~----~
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to