# HG changeset patch # User Kim Alvefur # Date 1545313522 -3600 # Node ID 81ef96368bffd2812887c9ba10f33f3e3ddefa94 # Parent 5281a795d6dfece4cdafd95bfe204573e3bf1985 MUC: Allow changing data attached to an only owner (fixes #1273) This previously prevented a single owner from setting their own nickname via admin query. The form method uses `true` as actor so it bypasses this check. diff -r 5281a795d6df -r 81ef96368bff plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Dec 19 23:14:13 2018 +0000 +++ b/plugins/muc/muc.lib.lua Thu Dec 20 14:45:22 2018 +0100 @@ -1254,7 +1254,7 @@ else local actor_affiliation = self:get_affiliation(actor); if actor_affiliation == "owner" then - if jid_bare(actor) == jid then -- self change + if jid_bare(actor) == jid and is_downgrade then -- self change -- need at least one owner local is_last = true; for j in self:each_affiliation("owner") do diff -r 5281a795d6df -r 81ef96368bff spec/scansion/muc_register.scs --- a/spec/scansion/muc_register.scs Wed Dec 19 23:14:13 2018 +0000 +++ b/spec/scansion/muc_register.scs Thu Dec 20 14:45:22 2018 +0100 @@ -504,3 +504,25 @@ + +# Romeo sets their their own nickname via admin query (see #1273) +Romeo sends: + + + + + + +Romeo receives: + + + + + + + + + +Romeo receives: + +