diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-26 12:04:45 -0700 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-07-03 15:07:39 -0500 |
commit | 4f8f0a4e1f2d5a1eb64f47e62958d77bd12379f3 (patch) | |
tree | 2aff43754fa275c2f60a6510f1d810d7b795bbbe /mediagoblin/auth/views.py | |
parent | 41a14c6efc1dd9cfc36f1b2eb4cb3f3b34e4d975 (diff) | |
download | mediagoblin-4f8f0a4e1f2d5a1eb64f47e62958d77bd12379f3.tar.lz mediagoblin-4f8f0a4e1f2d5a1eb64f47e62958d77bd12379f3.tar.xz mediagoblin-4f8f0a4e1f2d5a1eb64f47e62958d77bd12379f3.zip |
merge --squash persona branch to take care of a false merge commit in
the basic_auth branch that persona is forked from
Conflicts:
mediagoblin/templates/mediagoblin/auth/login.html
mediagoblin/templates/mediagoblin/auth/register.html
mediagoblin/templates/mediagoblin/edit/edit_account.html
These are commit messages from the squashed persona stuff:
- added tests and fixed minor errors
- fixed a redirect loop when only persona is enabled and accessing /auth/login
- moved persona.js to plugin's static dir
- fixes for add/remove persona emails
- add and remove personas
- working with multiple plugins
- working version
- switched to hidden form instead of ajax
- beginings
Diffstat (limited to 'mediagoblin/auth/views.py')
-rw-r--r-- | mediagoblin/auth/views.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 1cff8dcc..560080e4 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -41,8 +41,11 @@ def register(request): """ if 'pass_auth' not in request.template_env.globals: redirect_name = hook_handle('auth_no_pass_redirect') - return redirect(request, 'mediagoblin.plugins.{0}.register'.format( - redirect_name)) + if redirect_name: + return redirect(request, 'mediagoblin.plugins.{0}.register'.format( + redirect_name)) + else: + return redirect(request, 'index') register_form = hook_handle("auth_get_registration_form", request) @@ -73,8 +76,11 @@ def login(request): """ if 'pass_auth' not in request.template_env.globals: redirect_name = hook_handle('auth_no_pass_redirect') - return redirect(request, 'mediagoblin.plugins.{0}.login'.format( - redirect_name)) + if redirect_name: + return redirect(request, 'mediagoblin.plugins.{0}.login'.format( + redirect_name)) + else: + return redirect(request, 'index') login_form = hook_handle("auth_get_login_form", request) |