From 982f28708e23b148e9855db42a6fc7e419223474 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 11 Oct 2011 23:47:15 +0200 Subject: room owner not requestor permissions --- src/meetingtools/ac/api.py | 2 -- src/meetingtools/apps/room/views.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/meetingtools/ac/api.py b/src/meetingtools/ac/api.py index 863aadc..ed17260 100644 --- a/src/meetingtools/ac/api.py +++ b/src/meetingtools/ac/api.py @@ -160,8 +160,6 @@ class ACPClient(): return result.get_principal() def find_user(self,login): - if not login: - return None return self.find_principal("login", login, "user") def add_remove_member(self,principal_id,group_id,is_member): diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 59acdba..955e093 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -156,7 +156,7 @@ def _update_room(request, room, form=None): room.sco_id = sco_id room.save() - user_principal = api.find_user(request.user.username) + 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 -- cgit v1.1