[Liorithiel] fix who can kick whom. updated from last fixes in JEP

This commit is contained in:
Nikos Kouremenos 2005-09-07 21:25:00 +00:00
parent 914749b740
commit 88593b3856
1 changed files with 4 additions and 1 deletions

View File

@ -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')