diff options
author | Leif Johansson <leifj@sunet.se> | 2012-10-08 13:52:40 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-10-08 13:52:40 +0200 |
commit | bd8cf29f8c2f0c8298e7bf324f865bd7aab722b3 (patch) | |
tree | 32f0bf109a8afa3d26e95a5a6c1095c359c722ff /meetingtools/apps/room | |
parent | 75a8540989bae973093f0589b32274264f9cad2e (diff) |
- download-link
- don't catch exception - unlock in finally
Diffstat (limited to 'meetingtools/apps/room')
-rw-r--r-- | meetingtools/apps/room/views.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meetingtools/apps/room/views.py b/meetingtools/apps/room/views.py index c46ab6e..aa10cf6 100644 --- a/meetingtools/apps/room/views.py +++ b/meetingtools/apps/room/views.py @@ -152,7 +152,9 @@ def _update_room(request, room, form=None): user_principal = api.find_user(room.creator.username) #api.request('permissions-reset',{'acl-id': sco_id},True) - api.request('permissions-update',{'acl-id': sco_id,'principal-id': user_principal.get('principal-id'),'permission-id':'host'},True) # owner is always host + api.request('permissions-update',{'acl-id': sco_id, + 'principal-id': user_principal.get('principal-id'), + 'permission-id':'host'},True) # owner is always host if form: if form.cleaned_data.has_key('access'): @@ -409,10 +411,8 @@ def _goto(request,room,clean=True,promote=False): room.lock("Locked for cleaning") try: room = _clean(request,room) - except Exception,e: + finally: room.unlock() - raise e - room.unlock() if room.host_count == 0 and room.allow_host: return respond_to(request, {"text/html": "apps/room/launch.html"}, {'room': room}) @@ -496,6 +496,7 @@ def _can_tag(request,tag): # XXX implement access model for tags here soon return True,"" +@never_cache @login_required def untag(request,rid,tag): room = get_object_or_404(Room,pk=rid) @@ -536,6 +537,7 @@ def room_recordings(request,room): return [{'name': sco.findtext('name'), 'sco_id': sco.get('sco-id'), 'url': room.acc.make_url(sco.findtext('url-path')), + 'dl': room.acc.make_dl_url(sco.findtext('url-path')), 'description': sco.findtext('description'), 'date_created': iso8601.parse_date(sco.findtext('date-created')), 'date_modified': iso8601.parse_date(sco.findtext('date-modified'))} for sco in r.et.findall(".//sco")] |