aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/mod_pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-04 03:31:21 +0200
committerKim Alvefur <zash@zash.se>2018-08-04 03:31:21 +0200
commitcf89a1ac164248c6d24e0f87e363044c43db70cd (patch)
treeca86fb9af1eb399f3e081734e0712ff532440e01 /plugins/mod_pubsub/mod_pubsub.lua
parent1ff3dd919ee164f232dcbade13359ba166a975ad (diff)
downloadprosody-cf89a1ac164248c6d24e0f87e363044c43db70cd.tar.gz
prosody-cf89a1ac164248c6d24e0f87e363044c43db70cd.zip
mod_pubsub: Restrict access model to 'whitelist' and 'open'
'presence' and 'roster' makes more sense for PEP 'auithorize' needs additional code for authorization flow
Diffstat (limited to 'plugins/mod_pubsub/mod_pubsub.lua')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 18bdf17f..83ff0897 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -75,6 +75,9 @@ function check_node_config(node, actor, new_config) -- luacheck: ignore 212/acto
if (new_config["max_items"] or 1) > max_max_items then
return false;
end
+ if new_config["access_model"] ~= "whitelist" and new_config["access_model"] ~= "open" then
+ return false;
+ end
return true;
end