aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-04 03:40:30 +0200
committerKim Alvefur <zash@zash.se>2018-08-04 03:40:30 +0200
commitf884543a6dced0518605b7e55f7c28a4604e1366 (patch)
tree7208609de1745263d71d6fde157ca5f1efbf1d21 /plugins/mod_pep.lua
parentd28f6ca5efb3382629feb0bb27cec6a541f1c6b5 (diff)
downloadprosody-f884543a6dced0518605b7e55f7c28a4604e1366.tar.gz
prosody-f884543a6dced0518605b7e55f7c28a4604e1366.zip
mod_pep: Restrict access models to 'presence', 'whitelist' and 'open'
'roster' needs additional support to inspect roster groups 'authorize' is not implemented
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index eb00aef9..66f0df5b 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -44,6 +44,11 @@ function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node
if (new_config["max_items"] or 1) > max_max_items then
return false;
end
+ if new_config["access_model"] ~= "presence"
+ and new_config["access_model"] ~= "whitelist"
+ and new_config["access_model"] ~= "open" then
+ return false;
+ end
return true;
end