aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
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
commit4310c5f921348d4a34f826d17c7f74de7c4b79b6 (patch)
treeca86fb9af1eb399f3e081734e0712ff532440e01 /plugins/mod_pubsub
parentb4e05514d2f3cfaf0b1466b2c983808c6a96498f (diff)
downloadprosody-4310c5f921348d4a34f826d17c7f74de7c4b79b6.tar.gz
prosody-4310c5f921348d4a34f826d17c7f74de7c4b79b6.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')
-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