MUC: Fix logic error
authorKim Alvefur <zash@zash.se>
Sun, 16 Aug 2015 23:58:53 +0000 (01:58 +0200)
committerKim Alvefur <zash@zash.se>
Sun, 16 Aug 2015 23:58:53 +0000 (01:58 +0200)
plugins/muc/muc.lib.lua

index 63204d662bcc62ef5762c4e342d99fe70106dacf..deb9ee25acee04fb4b0d34a0ed2477b1dccf4f8e 100644 (file)
@@ -1146,7 +1146,7 @@ function room_mt:set_role(actor, occupant_jid, role, reason)
        else
                -- Can't do anything to other owners or admins
                local occupant_affiliation = self:get_affiliation(occupant.bare_jid);
-               if occupant_affiliation == "owner" and occupant_affiliation == "admin" then
+               if occupant_affiliation == "owner" or occupant_affiliation == "admin" then
                        return nil, "cancel", "not-allowed";
                end