diff options
author | Leif Johansson <leifj@sunet.se> | 2012-10-02 22:23:54 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-10-02 22:23:54 +0200 |
commit | ec839d583fff6b279c7cdec2fdf87762f81f9aa5 (patch) | |
tree | 912507bfc3353ba076ae225a8d40ba14f57d2972 /src/meetingtools/apps/auth/views.py | |
parent | 2346efdb58afff79fcfc1d581b0091f32ee6fac1 (diff) |
- bootstrap
- cleanup
- bugfixes
Diffstat (limited to 'src/meetingtools/apps/auth/views.py')
-rw-r--r-- | src/meetingtools/apps/auth/views.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/meetingtools/apps/auth/views.py b/src/meetingtools/apps/auth/views.py index 4ce8162..e294b0c 100644 --- a/src/meetingtools/apps/auth/views.py +++ b/src/meetingtools/apps/auth/views.py @@ -120,6 +120,10 @@ def accounts_login_federated(request): #profile.lastupdated = datetime.datetime.now() profile.save() + next = request.session.get("after_login_redirect", None) + if not next and request.GET.has_key('next'): + next = request.GET['next'] + acc = acc_for_user(request.user) with ac_api_client(request) as api: # make sure the principal is created before shooting off @@ -154,12 +158,9 @@ def accounts_login_federated(request): # group = connect_api.find_or_create_principal('name',e,'group',{'type': 'group','has-children':'1','name': e}) # if group: # connect_api.add_remove_member(principal.get('principal-id'),group.get('principal-id'),True) - - next = request.session.get("after_login_redirect", None) - if not next and request.GET.has_key('next'): - next = request.GET['next'] + if next is not None: return redirect_to(next) else: pass - return redirect_to("/") + return redirect_to(next) |