# HG changeset patch # User Jonas Schäfer # Date 1680105141 -7200 # Node ID dddac5a3f44789fa21e70f5a265517c620e2c685 # Parent 308024be6d6f964b245ea6f1958fc197fa6dfac0 mod_vcard_muc: take roles into account for access check This allows admins on the MUC component to force-set avatars, even if they are not owners in a particular MUC, similar to how they are granted auto-ownership in other contexts. diff -r 308024be6d6f -r dddac5a3f447 mod_vcard_muc/mod_vcard_muc.lua --- a/mod_vcard_muc/mod_vcard_muc.lua Wed Mar 29 17:21:45 2023 +0200 +++ b/mod_vcard_muc/mod_vcard_muc.lua Wed Mar 29 17:52:21 2023 +0200 @@ -76,7 +76,7 @@ session.send(st.error_reply(stanza, "cancel", "item-not-found")); end else - if from_affiliation == "owner" then + if from_affiliation == "owner" or (module.may and module:may("muc:automatic-ownership", from)) then if vcards:set(room_node, st.preserialize(stanza.tags[1])) then session.send(st.reply(stanza):tag("vCard", { xmlns = "vcard-temp" })); broadcast_presence(room, nil)