Kind of guessing, but as it is written, linking to 'login' would not be
the normal path for a user to become authenticated.  Instead, you would
link to a protected url, and a user would be presented with the login
form (and a 403 code).  The user authenticates, and is forwarded on to
the protected url.

But you are right about that not making sense in the context of a link
to 'login' (as in the example welcome template).  The login controller
might make more sense as follows:

        response.status = 403
        if identity.was_login_attempted():
            msg=_("The credentials you supplied were not correct or "
                   "did not grant access to this resource.")
        elif identity.get_identity_errors():
            msg=_("You must provide your credentials before accessing "
                   "this resource.")
        else:
            msg=_("Please log in.")
            response.status = 200
            forward_url= request.headers.get("Referer", "/")


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to