Software /
code /
prosody
Comparison
util/pubsub.lua @ 8816:0f9d5cfa84f9
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 22 May 2018 01:32:44 +0200 |
parent | 8813:2c55fccb0c0c |
child | 8936:7b75c7ec926e |
comparison
equal
deleted
inserted
replaced
8815:5974c9da1391 | 8816:0f9d5cfa84f9 |
---|---|
73 | 73 |
74 function service:may(node, actor, action) | 74 function service:may(node, actor, action) |
75 if actor == true then return true; end | 75 if actor == true then return true; end |
76 | 76 |
77 local node_obj = self.nodes[node]; | 77 local node_obj = self.nodes[node]; |
78 local node_aff = node_obj and node_obj.affiliations[actor]; | 78 local node_aff = node_obj and (node_obj.affiliations[actor] |
79 or node_obj.affiliations[self.config.normalize_jid(actor)]); | |
79 local service_aff = self.affiliations[actor] | 80 local service_aff = self.affiliations[actor] |
80 or self.config.get_affiliation(actor, node, action) | 81 or self.config.get_affiliation(actor, node, action) |
81 or "none"; | 82 or "none"; |
82 | 83 |
83 -- Check if node allows/forbids it | 84 -- Check if node allows/forbids it |