Switch to unified view

a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
...
...
44
44
45
class AuthController(BaseController):
45
class AuthController(BaseController):
46
46
47
    def __init__(self):
47
    def __init__(self):
48
        self.prefs = PreferencesController()
48
        self.prefs = PreferencesController()
49
        self.oauth = OAuth()
49
        self.oauth = OAuthController()
50
50
51
    @expose('jinja:allura:templates/login.html')
51
    @expose('jinja:allura:templates/login.html')
52
    @with_trailing_slash
52
    @with_trailing_slash
53
    def index(self, *args, **kwargs):
53
    def index(self, *args, **kwargs):
54
        orig_request = request.environ.get('pylons.original_request', None)
54
        orig_request = request.environ.get('pylons.original_request', None)
...
...
386
        except AssertionError, ae:
386
        except AssertionError, ae:
387
            flash('Error uploading key: %s' % ae, 'error')
387
            flash('Error uploading key: %s' % ae, 'error')
388
        flash('Key uploaded')
388
        flash('Key uploaded')
389
        redirect('.')
389
        redirect('.')
390
390
391
class OAuth(BaseController):
391
class OAuthController(BaseController):
392
392
393
    @with_trailing_slash
393
    @expose('jinja:allura:templates/oauth_applications.html')
394
    @expose('jinja:allura:templates/oauth_applications.html')
394
    def index(self, **kw):
395
    def index(self, **kw):
395
        c.form = F.oauth_application_form
396
        c.form = F.oauth_application_form
396
        return dict(apps=M.OAuthConsumerToken.for_user(c.user))
397
        return dict(apps=M.OAuthConsumerToken.for_user(c.user))
397
398
398
    @expose()
399
    @expose()
399
    @require_post()
400
    @require_post()
400
    @validate(F.oauth_application_form, error_handler=index)
401
    @validate(F.oauth_application_form, error_handler=index)
401
    def register(self, application_name=None, application_description=None, **kw):
402
    def register(self, application_name=None, application_description=None, **kw):
402
        M.OAuthConsumerToken(name=application_name, description=application_description)
403
        M.OAuthConsumerToken(name=application_name, description=application_description)
403
        flash('Application registered')
404
        flash('OAuth Application registered')
404
        redirect('.')
405
        redirect('.')
405
406
406
    @expose()
407
    @expose()
407
    @require_post()
408
    @require_post()
408
    def delete(self, id=None):
409
    def delete(self, id=None):