From 88593b38560a5289e56d827397bdebaa0c1b1443 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 7 Sep 2005 21:25:00 +0000 Subject: [PATCH] [Liorithiel] fix who can kick whom. updated from last fixes in JEP --- src/groupchat_window.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 54165cff1..f456d6c27 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -900,7 +900,10 @@ class GroupchatWindow(chat.Chat): # these conditions were taken from JEP 0045 item = xml.get_widget('kick_menuitem') item.connect('activate', self.kick, room_jid, nick) - if user_role != 'moderator' or target_role == 'moderator': + if user_role != 'moderator' or \ + (user_affiliation == 'admin' and target_affiliation == 'owner') or \ + (user_affiliation == 'member' and target_affiliation in ('admin', 'owner')) or \ + (user_affiliation == 'none' and target_affiliation != 'none'): item.set_sensitive(False) item = xml.get_widget('voice_checkmenuitem')