diff options
author | Leif Johansson <leifj@sunet.se> | 2012-11-01 17:16:45 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-11-01 17:16:45 +0100 |
commit | a9656c33fd36721ff7945d4db67aa304bc436286 (patch) | |
tree | b73813826fce6cb0f9a89068d92568a783e66e13 /meetingtools/apps/room | |
parent | 034011c5eb0eaadd88b743d36aef8566819fbc27 (diff) |
make it possible to disable cross-domain sso per cluster
Diffstat (limited to 'meetingtools/apps/room')
-rw-r--r-- | meetingtools/apps/room/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meetingtools/apps/room/views.py b/meetingtools/apps/room/views.py index 3476af8..7116f01 100644 --- a/meetingtools/apps/room/views.py +++ b/meetingtools/apps/room/views.py @@ -391,7 +391,7 @@ def go_by_path(request,path): {'text/html': 'apps/room/choose.html', 'application/json': json_response([base_url(request,room.go_url()) for room in rooms])}, {'rooms': rooms}) - + @login_required def promote_and_launch(request,rid): room = get_object_or_404(Room,pk=rid) @@ -409,6 +409,8 @@ def _random_key(length=20): alphabet = string.letters + string.digits return str().join(rg.choice(alphabet) for _ in range(length)) + + def _goto(request,room,clean=True,promote=False): if room.is_locked(): return respond_to(request, {"text/html": "apps/room/retry.html"}, {'room': room, 'wait': 10}) @@ -435,7 +437,7 @@ def _goto(request,room,clean=True,promote=False): room.save() key = None - if request.user.is_authenticated(): + if request.user.is_authenticated() and room.sco.acc.cross_domain_sso: key = _random_key(20) user_principal = api.find_user(request.user.username) principal_id = user_principal.get('principal-id') |