Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 9613:4d7b925652d9 0.11
MUC: Allow anyone read access to all affiliation lists in non-anonymous rooms (fixes #1230)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 09 Nov 2018 18:49:45 +0100 |
parent | 9612:abf9bacf77d4 |
child | 9615:66c6edf56397 |
child | 9640:28d4b9d5a432 |
comparison
equal
deleted
inserted
replaced
9612:abf9bacf77d4 | 9613:4d7b925652d9 |
---|---|
968 if _aff and _aff_rank and not _rol then | 968 if _aff and _aff_rank and not _rol then |
969 -- You need to be at least an admin, and be requesting info about your affifiliation or lower | 969 -- You need to be at least an admin, and be requesting info about your affifiliation or lower |
970 -- e.g. an admin can't ask for a list of owners | 970 -- e.g. an admin can't ask for a list of owners |
971 local affiliation_rank = valid_affiliations[affiliation or "none"]; | 971 local affiliation_rank = valid_affiliations[affiliation or "none"]; |
972 if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank) | 972 if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank) |
973 or (self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member) then | 973 or (self:get_whois() == "anyone") then |
974 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); | 974 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); |
975 for jid in self:each_affiliation(_aff or "none") do | 975 for jid in self:each_affiliation(_aff or "none") do |
976 local nick = self:get_registered_nick(jid); | 976 local nick = self:get_registered_nick(jid); |
977 reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up(); | 977 reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up(); |
978 end | 978 end |