On 10/02/2011 12:21 AM, pbreit wrote:
Can you branch in the user() function?

def user():
    if request.function=='login' and user_is_special:
        redirect('special_login')

Or it might be easier to do it in the view:

{{if user_is_special:}}
    {{=form.custom.begin}}
    ...
    {{=form.custom.end}}
{{else}}
    {{=form}}
{{pass}}

Unfortunately I can't do that because I'm redirected to the auth page by the auth.requires_login() decorator. This means I don't have any clue of the kind of user being redirected. What would be helpful in my case is if the decorator could redirect to a specific auth page based on the controller it was called from. But I have no idea if it is at all feasible.

Reply via email to