Switch to unified view

a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
1
import logging, string, os
1
import logging, string, os
2
from urllib import urlencode
2
from urllib import urlencode
3
from pprint import pformat
4
3
5
import bson
4
import bson
6
from tg import expose, session, flash, redirect, validate, config
5
from tg import expose, session, flash, redirect, validate, config
7
from tg.decorators import with_trailing_slash, without_trailing_slash
6
from tg.decorators import with_trailing_slash
8
from pylons import c, g, request, response
7
from pylons import c, g, request, response
9
from webob import exc as wexc
8
from webob import exc as wexc
10
9
11
import allura.tasks.repo_tasks
10
import allura.tasks.repo_tasks
12
from allura import model as M
11
from allura import model as M
...
...
182
            redirect('/')
181
            redirect('/')
183
182
184
    @expose()
183
    @expose()
185
    @require_post()
184
    @require_post()
186
    def do_login(self, return_to=None, **kw):
185
    def do_login(self, return_to=None, **kw):
187
        user = plugin.AuthenticationProvider.get(request).login()
186
        plugin.AuthenticationProvider.get(request).login()
188
        if return_to and return_to != request.url:
187
        if return_to and return_to != request.url:
189
            redirect(return_to)
188
            redirect(return_to)
190
        redirect('/')
189
        redirect('/')
191
190
192
    @expose()
191
    @expose()