diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-22 01:32:44 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-22 01:32:44 +0200 |
commit | bf88bf5c59e1112b049e8bacd0b1f6f2d63e064c (patch) | |
tree | 1690e39a441fd176f0621583f7f03eafb54e7d1e /util/pubsub.lua | |
parent | 542e4301f6073f045444a3163eb320bf1c70b582 (diff) | |
download | prosody-bf88bf5c59e1112b049e8bacd0b1f6f2d63e064c.tar.gz prosody-bf88bf5c59e1112b049e8bacd0b1f6f2d63e064c.zip |
util.pubsub: Also check for affiliation set on bare JID
This fixes eg publishing from a full JID when the affiliation has been
set on the bare JID, as would be common in XMPP.
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index 7cf376ef..86dd8e14 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -75,7 +75,8 @@ function service:may(node, actor, action) if actor == true then return true; end local node_obj = self.nodes[node]; - local node_aff = node_obj and node_obj.affiliations[actor]; + local node_aff = node_obj and (node_obj.affiliations[actor] + or node_obj.affiliations[self.config.normalize_jid(actor)]); local service_aff = self.affiliations[actor] or self.config.get_affiliation(actor, node, action) or "none"; |