Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 9101:1ff694534e98
mod_pubsub: Restrict access model to 'whitelist' and 'open'
'presence' and 'roster' makes more sense for PEP
'auithorize' needs additional code for authorization flow
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Aug 2018 03:31:21 +0200 |
parent | 9100:e01c7d0cbbf4 |
child | 9108:86f31a2174b3 |
comparison
equal
deleted
inserted
replaced
9100:e01c7d0cbbf4 | 9101:1ff694534e98 |
---|---|
71 end | 71 end |
72 | 72 |
73 local max_max_items = module:get_option_number("pubsub_max_items", 256); | 73 local max_max_items = module:get_option_number("pubsub_max_items", 256); |
74 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/actor 212/node | 74 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/actor 212/node |
75 if (new_config["max_items"] or 1) > max_max_items then | 75 if (new_config["max_items"] or 1) > max_max_items then |
76 return false; | |
77 end | |
78 if new_config["access_model"] ~= "whitelist" and new_config["access_model"] ~= "open" then | |
76 return false; | 79 return false; |
77 end | 80 end |
78 return true; | 81 return true; |
79 end | 82 end |
80 | 83 |