Skip to content


Subversion checkout URL

You can clone with
Download ZIP


SiteMap redirects not consistently redirecting #993

leedm777 opened this Issue · 1 comment

3 participants


It looks like Loc is being too eager about caching its params.

The following code should cause all requests to redirect to the login screen until the user logs in. Instead it redirects only the first page accessed. Any other URL does not redirect. That first page is stuck redirecting, even after the user has logged in. And it only prints "Redirecting to login" on the very first login.

    def isLoggedIn = User.loggedIn_?

    LiftRules.setSiteMap(new SiteMap(List({
      case Full(Req(path, _, _)) if !isLoggedIn && path != List("user_mgt", "login") =>
        logger.debug("Redirecting to login")
        Loc.EarlyResponse(() => Full(RedirectResponse("/user_mgt/login")))
    }), entries:_*))

If I use setSiteMapFunc instead of setSiteMap, and set my run.mode to debug, then I get the behavior I expect.

Please see [[url:|this thread]] on the mailing list.

@dpp dpp was assigned
@etorreborre etorreborre referenced this issue from a commit in etorreborre/framework
@dpp dpp Closes #953 -- adds headers to Mailer. Closes #993 sitemap global par…
…ams no longer cached. Closes #989 -- formGroup for onSubmit same as submit and button.  Closes #962 -- allows for separate subclasses of ProtoUser.  Closes #979 -- allows for global LocParams in ProtoUser
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.