diff options
author | Leif Johansson <leifj@sunet.se> | 2011-10-11 23:47:15 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-10-11 23:47:15 +0200 |
commit | 982f28708e23b148e9855db42a6fc7e419223474 (patch) | |
tree | f23dda5c7f9f4099cfbbb9f7eb1de1950f25b2eb /src/meetingtools | |
parent | 091daf065ddff524e635730da56ab261fd09233d (diff) |
room owner not requestor permissions
Diffstat (limited to 'src/meetingtools')
-rw-r--r-- | src/meetingtools/ac/api.py | 2 | ||||
-rw-r--r-- | src/meetingtools/apps/room/views.py | 2 |
2 files changed, 1 insertions, 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 |